Skip to main content

insertGroupMessageToLocalStorage

Feature Introduction

Description

Insert a group chat message locally.

Note

Visible only on the current device. Related Callback: onConversationChanged

Function Prototype


- (void)insertGroupMessageToLocalStorage:(OIMMessageInfo *)message
groupID:(NSString * _Nullable)groupID
sendID:(NSString * _Nullable)sendID
onSuccess:(nullable OIMMessageInfoCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;

Input Parameters

Parameter NameParameter TypeRequiredDescription
messageOIMMessageInfoYesMessage body
groupIDNSStringYesgroupID receiving the message
sendIDNSStringYesuserID sending the message

Return Result

NameTypeDescription
onSuccessOIMMessageInfoSuccessful return
onFailureOIMFailureCallbackFailed return

Code Example


[OIMManager.manager insertGroupMessageToLocalStorage:
groupID:@""
sendID:@""
onSuccess:^(OIMMessageInfo * _Nullable message) {

} onFailure:^(NSInteger code, NSString * _Nullable msg) {

}];