forked from snxraven/LinkUp-P2P-Chat
20 lines
474 B
JavaScript
20 lines
474 B
JavaScript
import Message from "./Message.js";
|
|
|
|
class IconMessage extends Message {
|
|
async constructor(peerName, avatarBuffer, topic, timestamp) {
|
|
super("icon", peerName, avatarBuffer, topic, timestamp);
|
|
}
|
|
|
|
toJsonString() {
|
|
return JSON.stringify({
|
|
...this.toJson()
|
|
});
|
|
}
|
|
|
|
static new(bot, avatarBuffer) {
|
|
return new IconMessage(bot.botName, avatarBuffer, bot.currentTopic, Date.now());
|
|
}
|
|
}
|
|
|
|
export default IconMessage;
|