Manage Channel Members
1. Invite Users
You can invite members to the channel even if you are not the owner.
[[TalkPlus sharedInstance] addMemberToChannel:channel
userIds:userIds
success:^(TPChannel *tpChannel) {
// SUCCESS
} failure:^(int errorCode, NSError *error) {
// FAILURE
}];
2. Remove Members
[[TalkPlus sharedInstance] removeMemberToChannel:channel
userIds:userIds
success:^(TPChannel *tpChannel) {
// SUCCESS
} failure:^(int errorCode, NSError *error) {
// FAILURE
}];
3. Get Channel Member List
[[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
}];
4. Ban Users
[[TalkPlus sharedInstance] banMemberToChannel:channel
userIds:userIds
success:^(TPChannel *tpChannel) {
// SUCCESS
} failure:^(int errorCode, NSError *error) {
// FAILURE
}];
5. Unban Users
[[TalkPlus sharedInstance] unBanMemberToChannel:channel
userIds:userIds
success:^(TPChannel *tpChannel) {
// SUCCESS
} failure:^(int errorCode, NSError *error) {
// FAILURE
}];
6. Mute Members
Mute feature allows the channel owner to mute specific members in the channel. Muted members are not allowed to send messages.
[[TalkPlus sharedInstance] muteMemberToChannel:channel
userIds:userIds
expireInMinutes:expireInMinutes
success:^(TPChannel *tpChannel) {
// SUCCESS
} failure:^(int errorCode, NSError *error) {
// FAILURE
}];
7. Unmute Members
[[TalkPlus sharedInstance] unMuteMemberToChannel:channel
userIds:userIds
success:^(TPChannel *tpChannel) {
// SUCCESS
} failure:^(int errorCode, NSError *error) {
// FAILURE
}];
8. Peer Mute
You can mute another member in the channel.
[TalkPlus.sharedInstance mutePeerToChannel:channel
userIds:@[userId]
expireInMinutes:0
success:^(TPChannel *tpChannel, NSArray<TPMember *> *mutedPeers) {
// SUCCESS (returns muted members)
} failure:^(int errorCode, NSError *error) {
// FAILURE
}];
9. Peer Unmute
[TalkPlus.sharedInstance unMutePeerToChannel:channel
userIds:@[userId]
success:^(TPChannel *tpChannel, NSArray<TPMember *> *unMutedPeers) {
// SUCCESS (returns unmuted members)
} failure:^(int errorCode, NSError *error) {
// FAILURE
}];
10. Get Peer Muted List
[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
}];
Last updated