From 0c910cc8c5a5487a129663431c6cd4d52640bd66 Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Mon, 10 Jul 2017 17:35:50 -0400
Subject: Fix multiple pinned post issues (#6887)

---
 webapp/actions/post_actions.jsx | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

(limited to 'webapp/actions/post_actions.jsx')

diff --git a/webapp/actions/post_actions.jsx b/webapp/actions/post_actions.jsx
index 87d9ed739..a32fee616 100644
--- a/webapp/actions/post_actions.jsx
+++ b/webapp/actions/post_actions.jsx
@@ -329,3 +329,23 @@ export function searchForTerm(term) {
         do_search: true
     });
 }
+
+export function pinPost(postId) {
+    return async (doDispatch, doGetState) => {
+        await PostActions.pinPost(postId)(doDispatch, doGetState);
+
+        AppDispatcher.handleServerAction({
+            type: ActionTypes.RECEIVED_POST_PINNED
+        });
+    };
+}
+
+export function unpinPost(postId) {
+    return async (doDispatch, doGetState) => {
+        await PostActions.unpinPost(postId)(doDispatch, doGetState);
+
+        AppDispatcher.handleServerAction({
+            type: ActionTypes.RECEIVED_POST_UNPINNED
+        });
+    };
+}
-- 
cgit v1.2.3-1-g7c22

