Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Clear private chat with SimpleChatModel


Level 1

Hi folks,

as I figured out working with the LCCS there is a posibility to let people chat directly(private) to each other via the ChatMessageDescriptor's recipient Attribute.

This works fine but if the user logs in again with the the same credentials and therefore gets the same Auth-Token, ALL private messages that has been sent to or by this person trigger again the History.Changed Event after subscribing to the same collection note.

So my question is if there is a possibility to clear those private messages without giving all user the "owner" permission?

Or do I always have to generate a different userID (maybe acc. to the Timestamp the login to the LCCS's collectionNode?

Thanks in advance,


1 Reply



Hi Michael,

Sorry for the delayed reply. I tested the scenario  you mentioned. If the chat is entirely private and if


is set to true for the SimpleChatModel, then we can achieve the use case you mentioned. [Try running the app as Owner first to set the sessionDependent to true. ]


<?xml version="1.0" encoding="utf-8"?>

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"


                  xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"

                  xmlns:pods="com.adobe.rtc.pods.*" xmlns:collab="com.adobe.rtc.collaboration.*" xmlns:session="com.adobe.rtc.session.*" xmlns:authentication="com.adobe.rtc.authentication.*">


          <!-- Place non-visual elements (e.g., services, value objects) here -->









               import com.adobe.rtc.events.ChatEvent;


               import mx.events.FlexEvent;


               protected function sChat_creationCompleteHandler(event:FlexEvent):void


                    // TODO Auto-generated method stub




               protected function onChatChange(p_evt:ChatEvent):void


                    trace("HistChange recieved");





     <session:ConnectSessionContainer roomURL="room URL" id="cSession" authenticator="{auth}" width="100%" height="100%">

          <pods:SimpleChat id="sChat" width="40%" height="100%" sessionDependent="true" creationComplete="sChat_creationCompleteHandler(event)"/>

          <!-- <s:Button click="{sChat.model.clear()}" label="clear" /> -->