rpaschoal / ng-chat

💬 A simple facebook/linkedin lookalike chat module for Angular applications.
MIT License
155 stars 92 forks source link

Test if Participant chat window is open. #207

Closed rcampion closed 2 years ago

rcampion commented 2 years ago

Is there a way to test if a user's chat window is open?

rpaschoal commented 2 years ago

Hi @rcampion ,

You should be able to keep a state from your application by listening to both onParticipantChatOpened and onParticipantChatClosed events.

rcampion commented 2 years ago

How do I listen to these events?

On Thu, Mar 31, 2022 at 7:51 PM Rafael Carvalho @.***> wrote:

Hi @rcampion https://github.com/rcampion ,

You should be able to keep a state from your application by listening to both onParticipantChatOpened and onParticipantChatClosed.

— Reply to this email directly, view it on GitHub https://github.com/rpaschoal/ng-chat/issues/207#issuecomment-1085242529, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBF7HVH4TU5M2S2HMCA2SLVCY27HANCNFSM5SDO6HWQ . You are receiving this because you were mentioned.Message ID: @.***>

-- Richard Campion @.*** http://www.richardcampion.com http://www.linkedin.com/in/richardcampion

rcampion commented 2 years ago

Ok. I figured out hew to listen to onParticipantChatOpened and onParticipantChatClosed.

But Browser A will not know if Browser B has a chat window opened.

I will need to store this state info in either a database or use WebSocket

rcampion commented 2 years ago

I realized Browser B does not need to know about Browser A.

All set.

Working fine.

https://www.zdslogic.com