Skip to main content

createTextAtMessage

Feature Introduction

Note

Create @ messages.

Function Prototype


+ (OIMMessageInfo *)createTextAtMessage:(NSString *)text
atUidList:(NSArray<NSString *> *)atUidList
atUsersInfo:(NSArray<OIMAtInfo *> *)atUsersInfo
message:(OIMMessageInfo * _Nullable)msg;

Input Parameters

Parameter NameParameter TypeRequiredDescription
textNSStringYesContent
atUidListNSArray<NSString *>YesList of @ user IDs
atUsersInfoNSArray< OIMAtInfo * >YesList of @ user info
msgOIMMessageInfoYesQuoted message

Return Value

NameTypeDescription
messageOIMMessageInfoSuccessful return

Code Example


OIMAtInfo *user1 = [OIMAtInfo new];
user1.atUserID = @"";
user1.groupNickname = @"";

OIMMessageInfo *message = [OIMMessageInfo createTextAtMessage:@"" atUidList:@[] atUsersInfo:@[user1] message:nil];

Function Prototype


+ (OIMMessageInfo *)createTextAtAllMessage:(NSString *)text
displayText:(NSString * _Nullable)displayText
message:(OIMMessageInfo * _Nullable)message;

Input Parameters

Parameter NameParameter TypeRequiredDescription
textNSStringYesContent
displayTextNSStringNoDisplayed text
msgOIMMessageInfoNoQuoted message

Return Value

NameTypeDescription
messageOIMMessageInfoSuccessful return

Code Example


OIMMessageInfo *message = [OIMMessageInfo createTextAtAllMessage:@""
displayText:nil
message:nil];