驾驶座驾进房
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#import "UserInfoModel.h"
|
||||
#import "MicroStateModel.h"
|
||||
#import "RoomInfoModel.h"
|
||||
#import "XPUserEnterRoomExtModel.h"
|
||||
|
||||
#import "NetImageView.h"
|
||||
|
||||
@@ -105,12 +106,20 @@
|
||||
NIMNotificationObject *notiMsg = (NIMNotificationObject *)message.messageObject;
|
||||
NIMChatroomNotificationContent *content = (NIMChatroomNotificationContent *)notiMsg.content;
|
||||
NIMChatroomNotificationMember *member = content.targets[0];
|
||||
NIMMessageChatroomExtension * messageExt = (NIMMessageChatroomExtension *)message.messageExt;
|
||||
switch (content.eventType) {
|
||||
case NIMChatroomEventTypeEnter:///进入房间
|
||||
{
|
||||
NSString* nick = member.nick.length > 0 ? member.nick : @"";
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
||||
NSDictionary * dic = [(NSDictionary *)messageExt.roomExt.toJSONObject objectForKey:message.from];
|
||||
XPUserEnterRoomExtModel * extModel = [XPUserEnterRoomExtModel modelWithDictionary:dic];;
|
||||
[attribute appendAttributedString:[self createTextAttribute:nick color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont]];
|
||||
if (extModel.carName.length > 0) {
|
||||
[attribute appendAttributedString:[self createTextAttribute:@" 驾着 " color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:extModel.carName color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
}
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"进入了房间" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
[self attributeAddHihtLight:attribute uid:message.from.integerValue];
|
||||
return attribute;
|
||||
|
Reference in New Issue
Block a user