|
protected |
Callback definition on get conversation list successfully.
|
protected |
Callback definition on get single conversation successfully.
|
protected |
Callback definition on get specified conversation list successfully.
|
protected |
Callback definition on get total count of unread messages successfully.
|
protected |
Callback definition on get conversation group list successfully.
|
protected |
Callback definition on operation conversation result.
|
protected |
|
protected |
|
protected |
- (void) addConversationListener: | (addConversationListener(listener:)) | NS_SWIFT_NAME |
1.1 Add the conversation listener
- (void) removeConversationListener: | (removeConversationListener(listener:)) | NS_SWIFT_NAME |
1.2 Remove the conversation listener
- (void) getConversationList: | (uint64_t) | nextSeq | |
count: | (int) | count | |
succ: | (V2TIMConversationResultSucc) | succ | |
fail: | (V2TIMFail) | fail | |
1.3 Get the conversation list
nextSeq | Pulling-by-page cursor. It is set to 0 when the information is pulled for the first time. The value of this field in the callback for the current paginated pulling is passed in for the next pull. |
count | Number of conversations pulled per page. The value of this field cannot be too large; otherwise, the pulling speed is affected. We recommend that you pull 100 conversations per page. |
- (void) getConversation: | (NSString *) | conversationID | |
succ: | (V2TIMConversationSucc) | succ | |
fail: | (V2TIMFail) | fail | |
1.4 Get a single conversation
conversationID | Unique ID of a conversation. For one-to-one chats, the value format is String.format("c2c_%s", "userID"). For group chats, the value format is String.format("group_%s", "groupID"). |
- (void) getConversationList: | (NSArray< NSString * > *) | conversationIDList | |
succ: | (V2TIMConversationListSucc) | succ | |
fail: | (V2TIMFail) | fail | |
1.5 Get a specified conversation list
conversationIDList | List of the unique IDs of conversations. For one-to-one chats, the value format is String.format("c2c_%s", "userID"). For group chats, the value format is String.format("group_%s", "groupID"). |
- (void) getConversationListByFilter: | (V2TIMConversationListFilter *) | filter | |
nextSeq: | (uint64_t) | seq | |
count: | (uint32_t) | count | |
succ: | (V2TIMConversationResultSucc) | succ | |
fail: | (V2TIMFail) | fail | |
1.6 Get the conversation list (advanced API,supported only in 6.5 and later versions)
filter | The conversation filter |
seq | The pulling-by-page cursor |
count | Number of conversations to be pulled per page |
- (void) deleteConversation: | (NSString *) | conversationID | |
succ: | (V2TIMSucc) | succ | |
fail: | (V2TIMFail) | fail | |
1.7 Delete a conversation
conversationID | Unique ID of a conversation. For one-to-one chats, the value format is String.format("c2c_%s", "userID"). For group chats, the value format is String.format("group_%s", "groupID"). |
- (void) deleteConversationList: | (NSArray< NSString * > *) | conversationIDList | |
clearMessage: | (BOOL) | clearMessage | |
succ: | (V2TIMConversationOperationResultSucc) | succ | |
fail: | (V2TIMFail) | fail | |
1.8 Delete a list of conversations (Supported only in 7.1 and later versions)
conversationIDList | List of the unique IDs of conversations. For one-to-one chats, the value format is String.format("c2c_%s", "userID"). For group chats, the value format is String.format("group_%s", "groupID"). |
clearMessage | Whether to delete messages in the conversation; if this is set to false, the messages are retained; if this is set to true, the messages will be deleted from local storage and the server and cannot be recovered. |
- (void) setConversationDraft: | (NSString *) | conversationID | |
draftText: | (NSString *) | draftText | |
succ: | (V2TIMSucc) | succ | |
fail: | (V2TIMFail) | fail | |
1.9 Set a draft for a conversation
conversationID | Unique ID of a conversation. For one-to-one chats, the value format is String.format("c2c_%s", "userID"). For group chats, the value format is String.format("group_%s", "groupID"). |
draftText | Draft content. The value null indicates cancelling the draft. |
- (void) setConversationCustomData: | (NSArray< NSString * > *) | conversationIDList | |
customData: | (NSData *) | customData | |
succ: | (V2TIMConversationOperationResultSucc) | succ | |
fail: | (V2TIMFail) | fail | |
1.10 Set conversation custom data(supported only in 6.5 and later versions)
customData | Custom data (max 256 bytes) |
- (void) pinConversation: | (NSString *) | conversationID | |
isPinned: | (BOOL) | isPinned | |
succ: | (V2TIMSucc) | succ | |
fail: | (V2TIMFail) | fail | |
1.11 Pin a conversion to the top (supported only in 5.3.425 and later versions)
conversationID | Unique ID of a conversation. For one-to-one chats, the value format is String.format("c2c_%s", "userID"). For group chats, the value format is String.format("group_%s", "groupID"). |
isPinned | Whether to pin a conversation to the top |
- (void) markConversation: | (NSArray< NSString * > *) | conversationIDList | |
markType: | (NSNumber *) | markType | |
enableMark: | (BOOL) | enableMark | |
succ: | (V2TIMConversationOperationResultSucc) | succ | |
fail: | (V2TIMFail) | fail | |
1.12 Mark a conversation(supported only in Chat Premium 6.5 and later versions)
conversationIDList | conversation list |
markType | mark type of the conversation. For the valid values, see the V2TIMConversationMarkType definition. |
enableMark | true:mark false:unmark |
If the existing mark does not meet your needs, you can customize the extension mark. The extension mark needs to meet the following two conditions:
1、Extended mark values must not conflict with existing mark values in V2TIIMConversationMarkType.
2、Extended mark values must be a 0x1LL << n (32 <= n < 64, that is, n must be greater than or equal to 32 and less than 64). For example, you can use the extension mark "0x1LL << 32" to mean "iPhone online".
- (void) getTotalUnreadMessageCount: | (V2TIMTotalUnreadMessageCountSucc) | succ | |
fail: | (V2TIMFail) | fail | |
1.13 Get the total message unread count of all conversations (supported only in 5.3.425 and later versions)
- (void) getUnreadMessageCountByFilter: | (V2TIMConversationListFilter *) | filter | |
succ: | (V2TIMTotalUnreadMessageCountSucc) | succ | |
fail: | (V2TIMFail) | fail | |
1.14 Get the total message unread count of conversations by filter (supported only in 7.0 and later versions)
filter | conversation filter |
- (void) subscribeUnreadMessageCountByFilter: | (V2TIMConversationListFilter *) | filter |
1.15 Subscribe to changes in the total unread message count for specified conversations (supported only in 7.0 and later versions)
filter | conversation filter |
- (void) unsubscribeUnreadMessageCountByFilter: | (V2TIMConversationListFilter *) | filter |
1.16 Unsubscribe from changes in the total unread message count for specified conversations (supported only in 7.0 and later versions)
filter | conversation filter |
- (void) cleanConversationUnreadMessageCount: | (NSString *) | conversationID | |
cleanTimestamp: | (uint64_t) | cleanTimestamp | |
cleanSequence: | (uint64_t) | cleanSequence | |
succ: | (V2TIMSucc) | succ | |
fail: | (V2TIMFail) | fail | |
1.17 Clear unread messages of a conversation (supported only in 7.1 and later versions)
conversationID | Unique ID of a conversation. For one-to-one chats, the value format is [NSString stringWithFormat:"c2c_%",userID]. For group chats, the value format is [[NSString stringWithFormat:"group_%",groupID]. |
cleanTimestamp | The timestamp (seconds) for clearing unread messages (only valid for one-to-one chats). Unread messages before the timestamp will be cleared. If the value is 0, all unread messages of the specified conversation will be cleared, and the unread message count will be set to 0. |
cleanSequence | The sequence for clearing unread messages (only valid for group chats). Unread messages before the specified message sequence will be cleared. If the value is 0, all unread messages of the specified conversation will be cleared, and the unread message count will be set to 0. |
- (void) setConversationListener: | (id< V2TIMConversationListener >) | listener |
1.18 Set the conversation listener
- (void) createConversationGroup: | (NSString *) | groupName | |
conversationIDList: | (NSArray< NSString * > *) | conversationIDList | |
succ: | (V2TIMConversationOperationResultSucc) | succ | |
fail: | (V2TIMFail) | fail | |
2.1 Create a conversation group.
groupName | group name(Required, length must be greater than 0, max 32 bytes) |
conversationIDList | conversation ID list(Required, cannot be empty) |
- (void) getConversationGroupList: | (V2TIMConversationGroupListSucc) | succ | |
fail: | (V2TIMFail) | fail | |
2.2 Get a list of conversation groups.
- (void) deleteConversationGroup: | (NSString *) | groupName | |
succ: | (V2TIMSucc) | succ | |
fail: | (V2TIMFail) | fail | |
2.3 Delete a conversation group.
- (void) renameConversationGroup: | (NSString *) | oldName | |
newName: | (NSString *) | newName | |
succ: | (V2TIMSucc) | succ | |
fail: | (V2TIMFail) | fail | |
2.4 Rename a conversation group.
- (void) addConversationsToGroup: | (NSString *) | groupName | |
conversationIDList: | (NSArray< NSString * > *) | conversationIDList | |
succ: | (V2TIMConversationOperationResultSucc) | succ | |
fail: | (V2TIMFail) | fail | |
2.5 Add conversations to a group.
- (void) deleteConversationsFromGroup: | (NSString *) | groupName | |
conversationIDList: | (NSArray< NSString * > *) | conversationIDList | |
succ: | (V2TIMConversationOperationResultSucc) | succ | |
fail: | (V2TIMFail) | fail | |
2.6 Remove conversations from a group.