Implementation
MessageMetaArrayRemoveRequest({
required BaseMessage message,
required List<MessageMetaArray> metaArrays,
}) : super() {
if (message is UserMessage) {
cmd = CommandString.userMessageUpdate;
} else if (message is FileMessage) {
cmd = CommandString.fileMessageUpdate;
} else {
throw InvalidParameterError();
}
payload.addAll({
'channel_url': message.channelUrl,
'msg_id': message.messageId,
'metaarray': {
'array': metaArrays.map((e) => e.toJson()).toList(),
'mode': MetaArrayUpdateMode.remove.asString(),
'upsert': true
},
});
}