TalkPlus.sharedInstance()?.removeMember(to: channel,
userIds: userIds,
success: { tpChannel in
// SUCCESS
}, failure: { (errorCode, error) in
// FAILURE
})
3. Get Channel Member List
For super channel, this is the only way to get channel members.
[[TalkPlus sharedInstance] getChannelMembers:tpChannel
lastUser:lastUser
success:^(NSArray<TPMember *> *tpUsers, BOOL hasNext) {
// SUCCESS
// If 'hasNext' is YES, call this method with the last object in 'tpUsers'.
} failure:^(int errorCode, NSError *error) {
// FAILURE
}];
TalkPlus.sharedInstance()?.getChannelMembers(tpChannel,
last: lastUser,
success: { tpMembers, hasNext in
// SUCCESS
// If 'hasNext' is true, call this method with the last object in 'tpMembers'.
}, failure: { (errorCode, error) in
// FAILURE
})
4. Ban Users
Only the channel owner can ban users.
Banned users are immediately removed from the channel and cannot join the channel until unbanned by the channel owner.
TalkPlus.sharedInstance()?.unMuteMember(to: channel,
userIds: userIds,
success: { tpChannel in
// SUCCESS
}, failure: { (errorCode, error) in
// FAILURE
})
8. Peer Mute
You can mute another member in the channel.
Any user can 'peer mute' another member in the channel.
If you 'peer mute' another member, you will stop seeing messages from that particular member in the channel but other users will continue to see messages from that member in the channel.
There is no push notification or event handler for this event.
expireInMinutes allows you to control when 'peer mute' status expires. Default value for expireInMinutes is 0 (no expiry).
[TalkPlus.sharedInstance getMutedPeers:channel
lastUser:lastUser
success:^(NSArray<TPMember *> *mutedPeers, hasNext) {
// SUCCESS
// If 'hasNext' is YES, call this method with the last object in 'mutedPeers'.
} failure:^(int errorCode, NSError *error) {
// FAILURE
}];
TalkPlus.sharedInstance()?.getMutedPeers(channel,
lastUser: lastUser,
success: { mutedPeers, hasNext in
// SUCCESS
// If 'hasNext' is true, call this method with the last object in 'mutedPeers'.
}, failure: { errorCode, error in
// FAILURE
})