summaryrefslogtreecommitdiffstats
path: root/webapp/actions/post_actions.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/actions/post_actions.jsx')
-rw-r--r--webapp/actions/post_actions.jsx20
1 files changed, 20 insertions, 0 deletions
diff --git a/webapp/actions/post_actions.jsx b/webapp/actions/post_actions.jsx
index 9599a9a77..4f861c909 100644
--- a/webapp/actions/post_actions.jsx
+++ b/webapp/actions/post_actions.jsx
@@ -252,3 +252,23 @@ export function loadProfilesForPosts(posts) {
AsyncClient.getProfilesByIds(list);
}
+
+export function addReaction(channelId, postId, emojiName) {
+ const reaction = {
+ post_id: postId,
+ user_id: UserStore.getCurrentId(),
+ emoji_name: emojiName
+ };
+
+ AsyncClient.saveReaction(channelId, reaction);
+}
+
+export function removeReaction(channelId, postId, emojiName) {
+ const reaction = {
+ post_id: postId,
+ user_id: UserStore.getCurrentId(),
+ emoji_name: emojiName
+ };
+
+ AsyncClient.deleteReaction(channelId, reaction);
+}