Expand my Community achievements bar.

Requirement for an admin to be logged into chat room for others to be able to chat

Avatar

Level 2

Requirement for an admin to be logged into chat room for others to be able to chat – admin should be logged in as a pre-requisite to enable others to chat.

For example:


Considering User A [with admin role] and user B [With Viewer or Publisher  role] have logged into the chat room , when User B tries to initiate the chat with user A following error occurred

user don’t have sufficient permission or role

The one solution we have applied is to have the  Admin user [ie User A in this case] will be always  be logged into  the room before any user [user B] logs in to the chat room.

Is this the expected behavior?. Or is there other solution for this?

Thanks,
Ritesh

3 Replies

Avatar

Former Community Member

Hi Sholay!,

It is not required for the admin to be present in a chat to have chat. But the admin is required to set up the room and the collectionnode and nodes if it’s a new room.

There can be various cases e.g. an admin runs an app that has chat in a new room so the chat collectionnode and nodes are created in that room. He can then leave and users can chat in that room always. He will never be required to enter the room again since he has set up the chat.

You can also create the simplechat collectionnode and nodes as an admin by entering into a room using room console or you can use server to server API. The central idea is admin is required for setting up a chat and its components in a fresh room. Once that is done , either using room console, server 2 server APIs or running an App , other users are free to use the components set up in that room.

Reading the developer guide upfront will help you.

Thanks

Hironmay Basu

Avatar

Level 2

Hi Hironmay

I have to gone through the developer guide .They are saying the same thing as you told me.

That means no need of admin to logged in to the room. But in my code when another user either viewer or publisher try to initiate the chat with another user.. this action generate following error .

user don’t have sufficient permission or role

To avoid the above error i am doing following action

userManager.setUserRole(userIdTest,UserRoles.OWNER);

When new user logged into the room, above line of code setting his role to the owner. After this I m not getting any error but facing another problem

Problem :  user can post only one message , afterward message are not getting displayed on the chat window .On the console I can see message like : chat notified

For the more info/code Please share your email id

Do reply me , I am stuck not getting what to do next

Thanks,
Ritesh

Avatar

Former Community Member

Hi,

I am quite sure you are doing something wrong and you haven’t set up the chat with your admin role. And its not advisable to set User roles to OWNER unless specifically required by application as you don’t want to grant users access to others messages and controls in the room. And even for setting user role, you need to be owner/admin of the room except setting your own role. Try out the SimpleChat Example and run examples like DefaultPods etc that has Simplechat pod component.

Going through examples and the guide thoroughly will help you and save time for all of us.

Thanks

Regards

Hironmay Basu