CometChat.addGroupListener(
uniqueGroupListenerId,
new CometChat.GroupListener({
onGroupMemberAddedToGroup: (res) => {
console.log(“cometChat.cometChatscometChat.cometChatscometChat.cometChats User joined”, {
res
});
},
})
);
Thank you for reaching out!
If you’re experiencing issues with CometChat.addGroupListener
there may be a small tweak needed in the listener name. Instead of using onGroupMemberAddedToGroup
try replacing it with onMemberAddedToGroup
as shown below:
CometChat.addGroupListener( uniqueGroupListenerId, new CometChat.GroupListener({ onMemberAddedToGroup: (message, userAdded, userAddedBy, userAddedIn) => { console.log("User joined", { message, userAdded, userAddedBy, userAddedIn, }); }, }));
This should resolve the issue you are facing.
Thanks,
Gaurav Singh
CometChat
Thanks you for sharing your views. Now it is working.