你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
搜索问题、话题或人...
输入关键字进行搜索
搜索:
问题
文章
开源项目
教程
FAQ
· · ·
活动
帮助
话题
周刊
登录
注册
环信_iOS
发送兔斯基的表情 我自己看不到图 只能看到文字
没有找到相关结果
已邀请:
与内容相关的链接
提交
2 个回复
momo
我已经找到问题了,发送消息时没有进行判断是否为大表情信息,在chatViewController里加上就好了
- (BOOL)isEmotionMessageFormessageViewController:(EaseMessageViewController *)viewController
messageModel:(id<IMessageModel>)messageModel
{
BOOL flag = NO;
if ([messageModel.message.ext objectForKey:MESSAGE_ATTR_IS_BIG_EXPRESSION]) {
return YES;
}
return flag;
}
- (EaseEmotion*)emotionURLFormessageViewController:(EaseMessageViewController *)viewController
messageModel:(id<IMessageModel>)messageModel
{
NSString *emotionId = [messageModel.message.ext objectForKey:MESSAGE_ATTR_EXPRESSION_ID];
EaseEmotion *emotion = [_emotionDic objectForKey:emotionId];
if (emotion == nil) {
emotion = [[EaseEmotion alloc] initWithName:@"" emotionId:emotionId emotionThumbnail:@"" emotionOriginal:@"" emotionOriginalURL:@"" emotionType:EMEmotionGif];
}
return emotion;
}
- (NSDictionary*)emotionExtFormessageViewController:(EaseMessageViewController *)viewController
easeEmotion:(EaseEmotion*)easeEmotion
{
return @{MESSAGE_ATTR_EXPRESSION_ID:easeEmotion.emotionId,MESSAGE_ATTR_IS_BIG_EXPRESSION:@(YES)};
}
donghai
你这个问题应该是你在环信的发送文字消息方法中给ext赋值了,把兔斯基ext字段给覆盖掉了,发送兔斯基表情也是发的文字消息,也是通过ext字段去判断的。 你按照下面的截图中,用可变字典去加你自己的ext扩展字段。
要回复问题请先
登录
或
注册
发起人
momo
问题状态
最新活动:
2016-06-12 15:26
浏览:
6116
关注:
3
人
2 个回复
momo
- (BOOL)isEmotionMessageFormessageViewController:(EaseMessageViewController *)viewController
messageModel:(id<IMessageModel>)messageModel
{
BOOL flag = NO;
if ([messageModel.message.ext objectForKey:MESSAGE_ATTR_IS_BIG_EXPRESSION]) {
return YES;
}
return flag;
}
- (EaseEmotion*)emotionURLFormessageViewController:(EaseMessageViewController *)viewController
messageModel:(id<IMessageModel>)messageModel
{
NSString *emotionId = [messageModel.message.ext objectForKey:MESSAGE_ATTR_EXPRESSION_ID];
EaseEmotion *emotion = [_emotionDic objectForKey:emotionId];
if (emotion == nil) {
emotion = [[EaseEmotion alloc] initWithName:@"" emotionId:emotionId emotionThumbnail:@"" emotionOriginal:@"" emotionOriginalURL:@"" emotionType:EMEmotionGif];
}
return emotion;
}
- (NSDictionary*)emotionExtFormessageViewController:(EaseMessageViewController *)viewController
easeEmotion:(EaseEmotion*)easeEmotion
{
return @{MESSAGE_ATTR_EXPRESSION_ID:easeEmotion.emotionId,MESSAGE_ATTR_IS_BIG_EXPRESSION:@(YES)};
}
donghai