purifyForQuote method
Purifies message data for use in QuoteContent.
Extracts core metadata (sender, receiver, type, serial number) from the original message envelope and content to form the "origin" field in quote messages.
@param envelope - Envelope of the original message being quoted
@param content - Content of the original message being quoted
@return Normalized map containing core quote origin metadata
Implementation
@override
Map purifyForQuote(Envelope head, Content body) {
ID from = head.sender;
ID? to = body.group;
to ??= head.receiver;
// build origin info
return {
'sender': from.toString(),
'receiver': to.toString(),
'type': body.type,
'sn': body.sn,
};
}