summaryrefslogtreecommitdiffstats
path: root/webapp/actions
diff options
context:
space:
mode:
authorkhawerrind <khawer.zeshan@gmail.com>2017-01-03 20:02:47 +0500
committerChristopher Speller <crspeller@gmail.com>2017-01-03 10:02:47 -0500
commit7cdfba62ef991f36363592a70f08db6a88b3c332 (patch)
treeb8782e7c66942ee959e16801db7d999beee591b3 /webapp/actions
parent96b4e0ed8767c879d5cd235b76feac43511835ed (diff)
downloadchat-7cdfba62ef991f36363592a70f08db6a88b3c332.tar.gz
chat-7cdfba62ef991f36363592a70f08db6a88b3c332.tar.bz2
chat-7cdfba62ef991f36363592a70f08db6a88b3c332.zip
PLT-3960 Don't show (message deleted) placeholder to the user that deleted the message (#4839)
* on post delete remove the whole post for the owner of the post while other user will still see post deleted message * now the deleter wont see the post while the other users will see deleted message * removed fromSocket check and now calling PostStore.removePost instead of PostStore.deletePost from view * fixed the bug which was causing to show message deleted until next action * added remove post from store to global action * moved removePostFromStore from global actions to post actions
Diffstat (limited to 'webapp/actions')
-rw-r--r--webapp/actions/post_actions.jsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/webapp/actions/post_actions.jsx b/webapp/actions/post_actions.jsx
index 207f0143d..0e48fb0e8 100644
--- a/webapp/actions/post_actions.jsx
+++ b/webapp/actions/post_actions.jsx
@@ -362,3 +362,8 @@ export function createPost(post, doLoadPost, success, error) {
}
);
}
+
+export function removePostFromStore(post) {
+ PostStore.removePost(post);
+ PostStore.emitChange();
+}