UNPKG

tjc-sdk

Version:

TIANJI IM SDK

2 lines (1 loc) 634 B
import t from"../../client/tjc.js";import{MessageContentType as e}from"../messageContentType.js";import s from"./groupNotification.js";class o extends s{operator="";constructor(t){super(e.ChangeGroupPortrait_Notification),this.operator=t}formatNotification(){return this.fromSelf?"您修改群头像":t.getGroupMemberDisplayName(this.groupId,this.operator)+"修改了群头像"}encode(){let e=super.encode(),s={g:this.groupId,n:this.name};return e.binaryContent=t.utf8_to_b64(JSON.stringify(s)),e}decode(e){super.decode(e);let s=t.b64_to_utf8(e.binaryContent),o=JSON.parse(s);this.groupId=o.g,this.operator=o.o}}export{o as default};