From db13b7a3ca3d3099392be557e47f838a7851a69a Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Mon, 1 Feb 2016 15:22:44 -0500
Subject: Changed deleted posts to be more general ephemeral posts

---
 web/react/dispatcher/event_helpers.jsx | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'web/react/dispatcher/event_helpers.jsx')

diff --git a/web/react/dispatcher/event_helpers.jsx b/web/react/dispatcher/event_helpers.jsx
index 5eb319320..cb41bd1bb 100644
--- a/web/react/dispatcher/event_helpers.jsx
+++ b/web/react/dispatcher/event_helpers.jsx
@@ -180,3 +180,10 @@ export function emitPreferenceChangedEvent(preference) {
         preference
     });
 }
+
+export function emitRemovePost(post) {
+    AppDispatcher.handleViewAction({
+        type: Constants.ActionTypes.REMOVE_POST,
+        post
+    });
+}
-- 
cgit v1.2.3-1-g7c22


From f935be121c0b6764e1e30f1b5d4eb6e78137fa36 Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Wed, 3 Feb 2016 15:21:03 -0500
Subject: Added helper methods to send ephemeral messages to specific users

---
 web/react/dispatcher/event_helpers.jsx | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

(limited to 'web/react/dispatcher/event_helpers.jsx')

diff --git a/web/react/dispatcher/event_helpers.jsx b/web/react/dispatcher/event_helpers.jsx
index cb41bd1bb..c1041e438 100644
--- a/web/react/dispatcher/event_helpers.jsx
+++ b/web/react/dispatcher/event_helpers.jsx
@@ -9,6 +9,7 @@ import Constants from '../utils/constants.jsx';
 const ActionTypes = Constants.ActionTypes;
 import * as AsyncClient from '../utils/async_client.jsx';
 import * as Client from '../utils/client.jsx';
+import * as Utils from '../utils/utils.jsx';
 
 export function emitChannelClickEvent(channel) {
     AsyncClient.getChannels(true);
@@ -187,3 +188,20 @@ export function emitRemovePost(post) {
         post
     });
 }
+
+export function sendEphemeralPost(message, channelId) {
+    const timestamp = Utils.getTimestamp();
+    const post = {
+        id: Utils.generateId(),
+        user_id: '0',
+        channel_id: channelId || ChannelStore.getCurrentId(),
+        message,
+        type: Constants.POST_TYPE_EPHEMERAL,
+        create_at: timestamp,
+        update_at: timestamp,
+        filenames: [],
+        props: {}
+    };
+
+    emitPostRecievedEvent(post);
+}
-- 
cgit v1.2.3-1-g7c22

