wildfirechat / android-chat

即时通讯,聊天,野火IMAndroid客户端,支持Android 4.x —— 最新
http://docs.wildfirechat.cn
Other
2.54k stars 889 forks source link

聊天缩略图问题 #653

Closed dyjAndroid closed 2 years ago

dyjAndroid commented 2 years ago

客户端是否会上传缩略图

public void sendImgMsg(Conversation conversation, Uri imageFileThumbUri, Uri imageFileSourceUri) {
        ImageMessageContent imgContent = new ImageMessageContent(imageFileSourceUri.getEncodedPath());
        String thumbParam = ChatManager.Instance().getImageThumbPara();
        if (!TextUtils.isEmpty(thumbParam)) {
            imgContent.setThumbPara(ChatManager.Instance().getImageThumbPara());
        }
        sendMessage(conversation, imgContent);
    }

imageFileThumbUri 这个客户端生成的缩略图,发送消息的时候没有用到,那么缩略图到底是客户端上传的还是服务器自己生成的呢

imndx commented 2 years ago

缩略图是客户端上传的,请参考ImageMessageContent#encode