Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drafty should correctly parse after fix for https://github.com/tinode/tinode-js/issues/74 #904

Closed
2 tasks done
dilshans2k opened this issue Apr 3, 2024 · 0 comments
Closed
2 tasks done
Labels

Comments

@dilshans2k
Copy link
Contributor

dilshans2k commented Apr 3, 2024

Subject of the issue

The issue tinode/tinode-js#74 suggests that each character of string must be treated as grapheme.

Your environment

Server-side

  • Your own setup:
    • platform: Linux
    • version of Tinode server: 0.22
    • database backend: mongo
    • standalone

Client-side

  • TinodeWeb/tinodejs: javascript client
    • Browser make and version.
    • IMPORTANT! Use index-dev.html to reproduce the problem, not index.html.

Steps to reproduce

On server, ensure that push notification adapter is turned on(fcm or tnpg).
Considering preview length: 5
Two ways to reproduce:

  • Send a text message from iOS such that it contains emoji(multi codepoint) and some formatting.
    For eg: Hi 🏴󠁧󠁢󠁳󠁣󠁴󠁿🏴󠁧󠁢󠁳󠁣󠁴󠁿 🏴󠁧󠁢󠁳󠁣󠁴󠁿🏴󠁧󠁢󠁳󠁣󠁴󠁿
  • Apply this commit patch in tinode-js and send a similar message like above.

Push notification sent has wrong text when parsed through drafty.Preview and drafty.PlainText

Expected behaviour

Push notification text content should be equal to Hi 🏴󠁧󠁢󠁳󠁣󠁴󠁿🏴󠁧󠁢󠁳󠁣󠁴󠁿

Actual behaviour

Push notification text content should be equal to Hi 🏴

@dilshans2k dilshans2k added the bug label Apr 3, 2024
dilshans2k added a commit to dilshans2k/tinode-chat that referenced this issue Apr 4, 2024
dilshans2k added a commit to dilshans2k/tinode-chat that referenced this issue Apr 26, 2024
or-else added a commit that referenced this issue Apr 27, 2024
…y-parse-message-content-for-push-notification

fix: #904 drafty should correctly parse message content for push notification
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant