addMessageMetaArray method
Adds list of metaArrays
with given message
.
Implementation
Future<BaseMessage> addMessageMetaArray(
BaseMessage message,
List<MessageMetaArray> metaArrays,
) async {
if (message.channelUrl != channelUrl) {
throw InvalidParameterError();
}
if (metaArrays.isEmpty) {
throw InvalidParameterError();
}
final cmd = Command.buildUpdateMessageMetaArray(
message, metaArrays, MetaArrayUpdateMode.add, true);
try {
var result = await _sdk.cmdManager.sendCommand(cmd);
if (result != null) {
return BaseMessage.msgFromJson(result.payload, type: result.cmd)!;
} else {
throw WebSocketError();
}
} catch (e) {
rethrow;
}
}