ChannelUserMessageUpdateApiRequest constructor
Null safety
Implementation
ChannelUserMessageUpdateApiRequest({
required ChannelType channelType,
required String channelUrl,
required int messageId,
required UserMessageParams params,
String? senderId,
List<String>? additionalMentionedUserIds,
}) : super(userId: senderId) {
url = '${channelType.urlString}/$channelUrl/messages/$messageId';
body = {
'message_type': CommandString.userMessage,
'user_id': senderId ?? state.userId,
if (additionalMentionedUserIds != null)
'mentioned_user_ids': additionalMentionedUserIds,
};
body.addAll(params.toJson());
body.removeWhere((key, value) => value == null);
}