Exposed score in the sendReaction function for channel

This commit is contained in:
Ayush Shekhar
2022-02-16 12:15:55 +05:30
parent 67f4927f3e
commit 538fdd6bc5
@@ -811,6 +811,7 @@ class Channel {
Future<SendReactionResponse> sendReaction( Future<SendReactionResponse> sendReaction(
Message message, Message message,
String type, { String type, {
int? score,
Map<String, Object?> extraData = const {}, Map<String, Object?> extraData = const {},
bool enforceUnique = false, bool enforceUnique = false,
}) async { }) async {
@@ -862,6 +863,13 @@ class Channel {
state?.addMessage(newMessage); state?.addMessage(newMessage);
if (score != null) {
extraData.putIfAbsent(
'score',
() => score,
);
}
try { try {
final reactionResp = await _client.sendReaction( final reactionResp = await _client.sendReaction(
messageId, messageId,