Reaction
Interactions are more fun when you can express yourself! Let users react using emojis, stickers, or thumbs up to messages

Add Reaction

You can add any number of reactions to the given post. The addReaction method accepts reaction name, where the reaction name is case sensitive, i.e "like" & "Like" are two different reactions.
1
import { addReaction, createQuery, runQuery } from '@amityco/ts-sdk';
2
const query = createQuery(addReaction, 'message', 'messageId1', 'like');
3
runQuery(query);
Copied!

Remove Reaction

You can remove any reactions added to the post. The removeReaction method removes reaction name. Reaction name is case sensitive in this case too.
1
import { removeReaction, createQuery, runQuery } from '@amityco/ts-sdk';
2
const query = createQuery(removeReaction, 'message', 'messageId1', 'like');
3
runQuery(query);
Copied!
Last modified 2mo ago
Export as PDF
Copy link