wildfire-im-sdk
Version:
野火IM SDK for Vue3 projects
37 lines (32 loc) • 840 B
JavaScript
/*
* Copyright (c) 2020 WildFireChat. All rights reserved.
*/
import ConversationType from "./conversationType";
/**
*
"conversation":{
"conversationType": 0,
"target": "UZUWUWuu",
"line": 0,
}
*/
export default class Conversation {
type = ConversationType.Single;
conversationType = this.type; // 这行是为了做一个兼容处理
target = '';
line = 0;
constructor(type, target, line = 0) {
this.type = type;
this.conversationType = type;
this.target = target;
this.line = line;
}
equal(conversation) {
if (!conversation) {
return false;
}
return this.type === conversation.type
&& this.target === conversation.target
&& this.line === conversation.line;
}
}