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

How to show badge as new message in chat list ? #48

Open
naitikpatel1990 opened this issue Feb 21, 2019 · 4 comments
Open

How to show badge as new message in chat list ? #48

naitikpatel1990 opened this issue Feb 21, 2019 · 4 comments

Comments

@naitikpatel1990
Copy link

Hi,

screen shot 2019-02-21 at 4 09 17 pm

Can you please tell me, how you handle new message badge icon show ?

is it handled by firebase itself or handled by your code ?

@andrealeo83
Copy link
Contributor

it's handled by our code. The conversation model has is_new field. It's true if there are new messages in the converversation.

@naitikpatel1990
Copy link
Author

Can you please send me chats Objects screenshot for let me know where it should be set 'is_new' ?

and also how you changed back when chat is open ? Do you write specific code?

@naitikpatel1990
Copy link
Author

PING!!!

@andrealeo83
Copy link
Contributor

The field is_new = true is set here (server side) :
https://github.com/chat21/chat21-cloud-functions/blob/master/functions/chat-api.js

image

The clients (ios, android, ionic,etc..) when receive the message update the field to false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants