Created
November 11, 2023 09:43
-
-
Save MaedehJJ/cac7c6c0c44c2f3085942e26fb898104 to your computer and use it in GitHub Desktop.
Amity adding and removing reactions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun setReactions( | |
message: AmityMessage, | |
isLiked: Boolean | |
) { | |
if (isLiked) { | |
message.react().addReaction(CommunityReactions.LIKE.reactionName).subscribe() | |
} else { | |
message.react().removeReaction(CommunityReactions.LIKE.reactionName).subscribe() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment