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