Where is public thread created
Where is public thread created? as we would like to integrate code to limit the public thread creator to be limited to admin. Also is there a way to allow few users to create the public thread?
First you should get the token:
// Get the token
RXPromise * tokenPromise = [RXPromise new];
[firebaseUser getTokenWithCompletion:^(NSString * token, NSError * error) {
if (!error) {
[tokenPromise resolveWithResult:token];
}
else {
[tokenPromise rejectWithReason:error];
}
}];
Then call authenticateWithDictionary on [BNetworkManager sharedManager].a.auth passing in the following Dictionary:
@{bLoginTypeKey: @(bAccountTypeCustom), bLoginCustomToken: @"TOKEN"}
This will authenticate the user with Chat SDK and perform the necessary setup steps.
Hi @Lavii7,
Just to extend @bensmiley's answer:
Currently we do not have administrator functionality for the Chat SDK. We are looking at implementing something along these lines but the functionality you are talking about would be different again.
If I am not mistaken you want to:
- Have a number of admin users
- Admin users have additional privileges - creating public groups
To do this you need the app to be able to recognise your user as an admin user. You can then have the app check the admin status of the user and enable/disable the UI for them. There are a number of ways you can do this:
- Manually add the entityID of admin users in Firebase. The app will then check the current admin entityIDs and will then let them do additional things. The disadvantage of this is that you have to manually find the users and add them to the admin branch.
- Have a different login for admin users. You could add a new button in login called "admin login" - the user would then have to enter an admin password to access it (you would tell your users this specific password to allow them to login). We could then add an admin flag to their account meaning they could then access the additional features.
Hopefully this makes sense? Let me know if you have any additional questions,
Simon
Yup this helps thanks