Closed vineethsreekumar closed 2 years ago
You can set a role like this:
let userId = "user id"
let threadId = "thread id"
if BChatSDK.thread().canChangeRole(threadId, forUser: userId) {
BChatSDK.thread().setRole(Affiliation.admin, forThread: threadId, forUser: userId).thenOnMain({ success in
}, { error in
})
}
You can get a role like this:
let userId = "user id"
let threadId = "thread id"
let role = BChatSDK.thread().role(threadId, forUser: userId)
If the role is nil, then it could be for a number of reasons:
etc...
Is the bug present in the demo Chat SDK project? - yes
What modifications have you made to the Chat SDK? get
iOS Version? Device or simulator?iphone 13 pro max
Steps taken to reproduce the problem:-(nonnull NSString ) role: (nonnull NSString ) threadEntityID forUser: (nonnull NSString *) userEntityID; function used
Expected result: get roles for user in the thread
Actual result: empty
Comments: How to get roles for user in a group and also how to setrole for members in a thread