updateReaction method

Future<void> updateReaction(
  1. String messageId,
  2. String reaction,
  3. bool isAdd
)

Implementation

Future<void> updateReaction(
  String messageId,
  String reaction,
  bool isAdd,
) async {
  try {
    if (isAdd) {
      await ChatUIKit.instance.addReaction(
        messageId: messageId,
        reaction: reaction,
      );
    } else {
      await ChatUIKit.instance.deleteReaction(
        messageId: messageId,
        reaction: reaction,
      );
    }
  } catch (e) {
    chatPrint('updateReaction: $e');
  }
}