Merge pull request #1046 from esteemapp/feature/filter-comment

Added signature filter for comments
This commit is contained in:
uğur erdal 2019-08-14 14:14:12 +03:00 committed by GitHub
commit b8d57681e6

View File

@ -115,6 +115,12 @@ export const parseComments = async (comments, currentUserName) => {
const pArray = comments.map(async comment => {
const activeVotes = await getActiveVotes(get(comment, 'author'), get(comment, 'permlink'));
if (comment.body.includes('Posted using [Partiko')) {
comment.body = comment.body
.split('\n')
.filter(item => item.includes('Posted using [Partiko') === false)
.join('\n');
}
comment.pending_payout_value = parseFloat(
get(comment, 'pending_payout_value') ? get(comment, 'pending_payout_value') : 0,
).toFixed(3);