// message typetypeMessageType='SYS'|'TEXT'|'CARD'|'ANNOUNCEMENT'|'BATCH_TRANSFER';// the construct of an original messagetypeMessage= { type:MessageType; content:string; quote?:Message;}// the construct generated by parsing a messagetypeParsedMessage= { type:MessageType; content:string; parsedContent?:ParsedContent; quote?:Message; unidentified?:boolean|undefined;}//content parsedtypeParsedContent=string|JoinGroupMessage|ShareMessage|NormalImageMessage|NFTMessage|MentionMessage// invitation to join a chat grouptypeJoinGroupMessage= { groupId:string; groupName:string; chatType:'p2p'|'group'}// sharing an URLtypeShareMessage= { shareUrl:string; shareName:string; shareIcon:string;}// normal imagetypeNormalImageMessage= { imgUrl:string; s3Key:string;}// NFTtypeNFTMessage= { imgUrl:string; nftChain:string;}// to quote a messagetypeMentionMessage= { mentionContent:string; mentionPosition:number[];}
In ParsedMessage construct, unidentified flags if the message can be parsed, and parsedContent is the result parsed from the content in the original message. Other keys in the construct come from respective segments in the construct of the original message.