wildfire-im-sdk
Version:
野火IM SDK for Vue3 projects
35 lines (27 loc) • 725 B
JavaScript
/*
* Copyright (c) 2020 WildFireChat. All rights reserved.
*/
import NotificationMessageContent from './notificationMessageContent'
import MessageContentType from '../messageContentType';
export default class TipNotificationMessageContent extends NotificationMessageContent {
tip = '';
constructor(tip) {
super(MessageContentType.Tip_Notification);
this.tip = tip;
}
formatNotification() {
return this.tip;
}
digest() {
return this.tip;
}
encode() {
let payload = super.encode();
payload.content = this.tip;
return payload;
};
decode(payload) {
super.decode(payload);
this.tip = payload.content;
}
}