tjc-sdk
Version:
TIANJI IM SDK
2 lines (1 loc) • 577 B
JavaScript
import e from"./conversation.js";import s from"../messages/message.js";class t{conversation;matchMessage;timestamp;matchCount;static fromProtoConversationSearchResult(o){let a=new t;return o.conversation?a.conversation=new e(void 0!==o.conversation.conversationType?o.conversation.conversationType:o.conversation.type,o.conversation.target,o.conversation.line):a.conversation=new e(o.conversationType,o.target,o.line),a.matchCount=o.marchedCount,1===o.marchedCount&&(a.matchMessage=s.fromProtoMessage(o.marchedMessage)),a.timestamp=Number(o.timestamp),a}}export{t as default};