Skip to content

Commit

Permalink
fix: trimmed mentioned user text in messages when special characters …
Browse files Browse the repository at this point in the history
…used (#1909)

* fix: trimmed mentioned user text in messages when special characters used

* refactor: reduce usage

* refactor: remove useless console.log
  • Loading branch information
khushal87 authored Jan 13, 2023
1 parent 99dfee5 commit e64b1d6
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,9 @@ export const renderText = <

return (
<Text key={state.key} onLongPress={onLongPress} onPress={onPress} style={styles.mentions}>
{Array.isArray(node.content) ? node.content[0].content || '' : output(node.content, state)}
{Array.isArray(node.content)
? node.content.reduce((acc, current) => acc + current.content, '') || ''
: output(node.content, state)}
</Text>
);
};
Expand Down

0 comments on commit e64b1d6

Please sign in to comment.