hasUserReacted method

bool hasUserReacted(
  1. String messageId,
  2. String emoji
)

Checks if the current user has reacted with a specific emoji to a messageId.

Implementation

bool hasUserReacted(String messageId, String emoji) {
  final reactions = getReactions(messageId);
  return reactions.any((r) => r.emoji == emoji && r.userId == currentUserId);
}