发送兔斯基的表情 我自己看不到图 只能看到文字


屏幕快照_2016-06-01_下午7.28_.55_.png


已邀请:

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扩展字段。

要回复问题请先登录注册

知识价值的认可,源自您的赞赏

扫描二维码,你的支付将由imGeek代收后转给对方

×