deleteReaction method
- BaseMessage message,
- String key
Deletes Reaction
.
Implementation
Future<ReactionEvent> deleteReaction(BaseMessage message, String key) async {
sbLog.i(StackTrace.current, 'messageId: ${message.messageId}, key: $key');
checkUnsupportedAction();
if (message.channelUrl != channelUrl) {
throw InvalidParameterException();
}
if (key.isEmpty) {
throw InvalidParameterException();
}
final res = await chat.apiClient.send<ReactionEvent>(
ChannelReactionDeleteRequest(
chat,
channelType: message.channelType,
channelUrl: message.channelUrl,
messageId: message.messageId,
key: key,
),
);
res.messageId = message.messageId;
return res;
}