tjc-sdk
Version:
TIANJI IM SDK
2 lines (1 loc) • 711 B
JavaScript
import t from"../../client/tjc.js";import{MessageContentType as s}from"../messageContentType.js";import i from"./groupNotification.js";class e extends i{operator="";name="";constructor(t,i){super(s.ChangeGroupName_Notification),this.operator=t,this.name=i}formatNotification(){return this.fromSelf?"您修改群名称为:"+this.name:t.getGroupMemberDisplayName(this.groupId,this.operator)+"修改群名称为:"+this.name}encode(){let s=super.encode(),i={g:this.groupId,n:this.name,o:this.operator};return s.binaryContent=t.utf8_to_b64(JSON.stringify(i)),s}decode(s){super.decode(s);let i=t.b64_to_utf8(s.binaryContent),e=JSON.parse(i);this.groupId=e.g,this.operator=e.o,this.name=e.n}}export{e as default};