rpaschoal / ng-chat

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

How to call OnUserClick directly from anywhere ? #90

Closed bhaumikdarji closed 5 years ago

bhaumikdarji commented 5 years ago

Hi,

I can open friend chat window from anywhere. But I want to open direct chat window for use to use from anywhere. Currently we have to click from Friend list only. How to call it from anywhere?

rpaschoal commented 5 years ago

Hi @bhaumikdarji

Have you tried using IChatController ? Check this section on the docs: https://github.com/rpaschoal/ng-chat#triggering-ng-chat-actions-from-elsewhere

Basically you need to get the instance of your chat and then you can just open a chat window for a user by calling this.ngChatInstance.triggerOpenChatWindow(user);

bhaumikdarji commented 5 years ago

Yes working now. Thanks

rpaschoal commented 5 years ago

Good to know @bhaumikdarji, cheers!