Exposed score for send reaction in the client side as well

This commit is contained in:
Ayush Shekhar
2022-02-16 14:05:48 +05:30
parent 538fdd6bc5
commit 3fc9aabe6f
2 changed files with 17 additions and 16 deletions
@@ -1157,15 +1157,22 @@ class StreamChatClient {
Future<SendReactionResponse> sendReaction(
String messageId,
String reactionType, {
int score = 1,
Map<String, Object?> extraData = const {},
bool enforceUnique = false,
}) =>
_chatApi.message.sendReaction(
messageId,
reactionType,
extraData: extraData,
enforceUnique: enforceUnique,
);
}) {
extraData.putIfAbsent(
'score',
() => score,
);
return _chatApi.message.sendReaction(
messageId,
reactionType,
extraData: extraData,
enforceUnique: enforceUnique,
);
}
/// Delete a [reactionType] from this [messageId]
Future<EmptyResponse> deleteReaction(