
import MessageType from "$utils/socket/const/messageType";

export default <LibMixins>{

    data(){
        return {
            MessageType
        }
    },

    computed:{

        user(){
          return this.userInfo[this.item.uid] || {};
        },

        reverse(){
            return this.item.uid == this.nowUid;
        },

        message(){
            if (this.item.message) {
                let message = this.item.message;

                // @ts-ignore
                return window.RongIMLib.RongIMEmoji.symbolToEmoji(message.replace(/[\n\r]/g,function () {
                    return '<br />';
                }));
            } else {
                return  '';
            }

        }

    }

}
