NIMChatExtendManager Protocol Reference
| Conforms to | NSObject |
|---|---|
| Declared in | NIMChatExtendManagerProtocol.h |
– reply:to:error:
required method
Reply a message
- (BOOL)reply:(NIMMessage *)message to:(NIMMessage *)target error:(NSError *__nullable *)errorParameters
message |
new message |
|---|---|
target |
message to be replied. |
error |
error. If an error occurs in preparing to send the message, this error will be specified with corresponding information |
Return Value
result The result returned indicates whether the current function call is successful, and subsequent callbacks are required to determine whether the message has been sent to the server.
Discussion
Reply a message
Declared In
NIMChatExtendManagerProtocol.h
– reply:to:completion:
required method
Reply a message in async call
- (void)reply:(NIMMessage *)message to:(NIMMessage *)target completion:(__nullable NIMChatManagerBlock)blockParameters
message |
new message |
|---|---|
target |
message to be replied. |
block. |
completion callback. The callback indicates whether the current function call is successful, and subsequent callbacks are required to determine whether the message has been sent to the server. |
Discussion
Reply a message in async call
Declared In
NIMChatExtendManagerProtocol.h
– subMessages:
required method
Get the messages of a thread message
- (NSArray<NIMMessage*> *_Nullable)subMessages:(NIMMessage *)messageParameters
message |
parent message |
|---|
Return Value
list of child messages for the target message
Discussion
Get the messages of a thread message
Declared In
NIMChatExtendManagerProtocol.h
– subMessagesCount:
required method
Get the messages of a thread message
- (NSInteger)subMessagesCount:(NIMMessage *)messageParameters
message |
parent message |
|---|
Return Value
the number of child messages for the target message
Discussion
Get the messages of a thread message
Declared In
NIMChatExtendManagerProtocol.h
– fetchSubMessages:option:completion:
required method
Get child messages of a thread message
- (void)fetchSubMessages:(NIMChatExtendBasicInfo *)info option:(NIMThreadTalkFetchOption *_Nullable)option completion:(NIMThreadTalkFetchMessages)blockParameters
info |
target message |
|---|---|
option |
pagination option |
block |
completion callback |
Discussion
Get child messages of a thread message
Declared In
NIMChatExtendManagerProtocol.h
– fetchSubMessagesFrom:option:completion:
required method
Get child messages of a thread message
- (void)fetchSubMessagesFrom:(NIMMessage *)message option:(NIMThreadTalkFetchOption *_Nullable)option completion:(NIMThreadTalkFetchMessages)blockParameters
message |
target message |
|---|---|
option |
pagination option |
block |
completion callback |
Discussion
Get child messages of a thread message
Declared In
NIMChatExtendManagerProtocol.h
– fetchHistoryMessages:syncToDB:completion:
required method
Get messages by MessageId
- (void)fetchHistoryMessages:(NSArray<NIMChatExtendBasicInfo*> *)infos syncToDB:(BOOL)sync completion:(NIMFetchHistoryMessagesByIds)blockParameters
infos |
request info |
|---|---|
sync |
specify whether messages are synced to the local storage. Note that the message in deleted state in the database cannot be overwritten by synchronization. |
block |
Completion callback |
Discussion
Get messages by MessageId
Declared In
NIMChatExtendManagerProtocol.h
– addQuickComment:toMessage:completion:
required method
Send a quick reply
- (void)addQuickComment:(NIMQuickComment *)comment toMessage:(NIMMessage *)message completion:(NIMQuickCommentHandler _Nullable)completionParameters
comment |
comment content |
|---|---|
message |
message to be replied |
completion |
completion callback |
Discussion
Send a quick reply
Declared In
NIMChatExtendManagerProtocol.h
– deleteQuickComment:completion:
required method
Delete a comment from the server
- (void)deleteQuickComment:(NIMQuickComment *)comment completion:(NIMQuickCommentHandler _Nullable)completionParameters
comment |
taget comment |
|---|---|
completion |
completion callback |
Discussion
Delete a comment from the server
Declared In
NIMChatExtendManagerProtocol.h
– fetchQuickComments:completion:
required method
Get multiple comments at a time
- (void)fetchQuickComments:(NSArray<NIMMessage*> *)messages completion:(NIMFetchCommentsByMsgsHandler)completionParameters
messages |
target messages. Up to 20 messages can be obtained |
|---|---|
completion |
Completion callback |
Discussion
Get multiple comments at a time
Declared In
NIMChatExtendManagerProtocol.h
– quickCommentsByMessage:completion:
required method
Get the quick comment of a message
- (void)quickCommentsByMessage:(NIMMessage *)message completion:(NIMGetQuickCommentsByMsgHandler)completionParameters
message |
target message |
|---|---|
completion |
Completion callback |
Discussion
Get the quick comment of a message
Declared In
NIMChatExtendManagerProtocol.h
– queryCollect:completion:
required method
Query paginated bookmarks
- (void)queryCollect:(NIMCollectQueryOptions *)option completion:(nullable NIMCollectQueryBlock)completionParameters
option |
pagination option |
|---|---|
completion |
completion callback |
Discussion
Query paginated bookmarks
Declared In
NIMChatExtendManagerProtocol.h
– addCollect:completion:
required method
Add a bookmark
- (void)addCollect:(NIMAddCollectParams *)info completion:(nullable NIMAddCollectBlock)completionParameters
info |
Bookmark parameters. Required fields: type, data, and ext |
|---|---|
completion |
completion callback |
Discussion
Add a bookmark
Declared In
NIMChatExtendManagerProtocol.h
– removeCollect:completion:
required method
Remove multiple bookmarks
- (void)removeCollect:(NSArray<NIMCollectInfo*> *)collectList completion:(nullable NIMRemoveCollectBlock)completionParameters
collectList |
Remove multiple bookmarks at a time. Required fields: id and createTime |
|---|---|
completion |
completion callback |
Discussion
Remove multiple bookmarks
Declared In
NIMChatExtendManagerProtocol.h
– updateCollect:completion:
required method
Update bookmarks
- (void)updateCollect:(NIMCollectInfo *)collectInfo completion:(nullable NIMUpdateCollectBlock)completionParameters
collectInfo |
Bookmarks updated. The id, createTime, and ext fields are required. If ext is not specified, the ext field is deleted. |
|---|
Discussion
Update bookmarks
Declared In
NIMChatExtendManagerProtocol.h
– addStickTopSession:completion:
required method
Pin a session
- (void)addStickTopSession:(NIMAddStickTopSessionParams *)params completion:(nullable NIMAddStickTopSessionCompletion)completionParameters
params |
parameters for pinning a session |
|---|---|
completion |
completion callback |
Discussion
Pin a session
Declared In
NIMChatExtendManagerProtocol.h
– removeStickTopSession:completion:
required method
Unpin a session
- (void)removeStickTopSession:(NIMStickTopSessionInfo *)info completion:(nullable NIMRemoveStickTopSessionCompletion)completionParameters
info |
session info to be unpinned |
|---|---|
completion |
Completion callback |
Discussion
Unpin a session
Declared In
NIMChatExtendManagerProtocol.h
– udpateStickTopSession:completion:
required method
Update a pinned session
- (void)udpateStickTopSession:(NIMStickTopSessionInfo *)info completion:(nullable NIMUpdateStickTopSessionCompletion)completionParameters
info |
session info to be updated |
|---|---|
completion |
Completion callback |
Discussion
Update a pinned session
Declared In
NIMChatExtendManagerProtocol.h
– loadStickTopSessionInfos:
required method
Query all pinned sessions
- (void)loadStickTopSessionInfos:(nullable NIMLoadStickTopSessionInfosCompletion)completionParameters
completion |
completion callback |
|---|
Discussion
Query all pinned sessions
Declared In
NIMChatExtendManagerProtocol.h
– loadRecentSessionsWithOptions:completion:
required method
Get recent sessions
- (void)loadRecentSessionsWithOptions:(NIMLoadRecentSessionsOptions *)options completion:(nullable NIMLoadRecentSessionsCompletion)completionParameters
options |
query options (such as sorting by top session) |
|---|
Discussion
Get recent sessions
Declared In
NIMChatExtendManagerProtocol.h
– sortRecentSessions:withStickTopInfos:
required method
Sort recent sessions by pinned chat info
- (NSArray<NIMRecentSession*> *)sortRecentSessions:(NSArray<NIMRecentSession*> *)recentSessions withStickTopInfos:(NSDictionary<NIMSession*,NIMStickTopSessionInfo*> *)infosParameters
recentSessions |
The top sessions to be sorted. if a mutable array is passed, they will be sorted in place |
|---|---|
infos |
[session: pinned info] mapping |
Return Value
sorted list of recent sessions. If a mutable array is passed, the array will be returned
Discussion
Sort recent sessions by pinned chat info
Declared In
NIMChatExtendManagerProtocol.h
– stickTopInfoForSession:
required method
Query pinned info in a session
- (NIMStickTopSessionInfo *)stickTopInfoForSession:(NIMSession *)sessionParameters
session |
The session to be queried |
|---|
Return Value
Pinned session
Discussion
Query pinned info in a session
Declared In
NIMChatExtendManagerProtocol.h
– addMessagePin:completion:
required method
Add a PIN record
- (void)addMessagePin:(NIMMessagePinItem *)item completion:(nullable NIMAddMessagePinCompletion)completionParameters
item |
The PIN target |
|---|---|
completion |
completion callback |
Discussion
Add a PIN record
Declared In
NIMChatExtendManagerProtocol.h
– removeMessagePin:completion:
required method
Remove a PIN record
- (void)removeMessagePin:(NIMMessagePinItem *)item completion:(nullable NIMRemoveMessagePinCompletion)completionParameters
item |
PIN record to be removed |
|---|---|
completion |
Completion callback |
Discussion
Remove a PIN record
Declared In
NIMChatExtendManagerProtocol.h
– updateMessagePin:completion:
required method
Update a PIN record extension
- (void)updateMessagePin:(NIMMessagePinItem *)item completion:(nullable NIMUpdateMessagePinCompletion)completionParameters
item |
PIN record to be updated. If the ext field is not passed, delete the record. |
|---|---|
completion |
completion callback |
Discussion
Update a PIN record extension
Declared In
NIMChatExtendManagerProtocol.h
– loadMessagePinsForSession:completion:
required method
Query all PIN records. Tthe first query of the session after login will trigger a network synchronization.
- (void)loadMessagePinsForSession:(NIMSession *)session completion:(nullable NIMLoadMessagePinsCompletion)completionParameters
session |
session |
|---|---|
completion |
completion callback |
Discussion
Query all PIN records. Tthe first query of the session after login will trigger a network synchronization.
Declared In
NIMChatExtendManagerProtocol.h
– pinItemForMessage:
required method
Query the PIN record of a message
- (NIMMessagePinItem *)pinItemForMessage:(NIMMessage *)messageParameters
message |
message |
|---|
Return Value
record
Discussion
Query the PIN record of a message
Declared In
NIMChatExtendManagerProtocol.h
– addDelegate:
required method
- Add a thread message delegate *
- @param delegate thread message delegate
- (void)addDelegate:(id<NIMChatExtendManagerDelegate>)delegateDiscussion
- Add a thread message delegate *
- @param delegate thread message delegate
Declared In
NIMChatExtendManagerProtocol.h
– removeDelegate:
required method
Remove a thread message delegate
- (void)removeDelegate:(id<NIMChatExtendManagerDelegate>)delegateParameters
delegate |
thread message delegate |
|---|
Discussion
Remove a thread message delegate
Declared In
NIMChatExtendManagerProtocol.h