Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Extreme newbe confused about private chat

Avatar

Former Community Member

I am working on an app that needs the ability for mostly private chats (versus chatroom discussions).  Looking at the afcs docs and code samples I cannot seem to find an easy way to establish communications between 2 users without administering rooms/groups, etc.  What I was hoping for was a way to keep tabs on online vs. offline users (abviously afcs does this well with session mgmt, roster, etc), with the p2p capabilities like Stratus (get the peerid of a user and then call them directly).  Can someone enlighten me? thanks

2 Replies

Avatar

Former Community Member

Sup Dude,

I don't know if P2P is really what you want for this case (it wouldn't support, say, offline messages or even get the order of messages right) - it's pretty easy to do this w/ AFCS. Just set up a SimpleChatModel (it's in the SharedModel package), and when you send a chatMessageDescriptor through it, specify a recipient (the userID of the specific person you're talking to). This way, everyone in the room can be talking through the same model, but each conversation is kept private.

hope that helps

nigel

Avatar

Former Community Member

Thanks Nigel,

Forest and the trees.  Should have seen this.

Thanks for the tips.