summaryrefslogtreecommitdiffstats
path: root/web/react/utils
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-10-15 10:44:04 -0400
committerJoramWilander <jwawilander@gmail.com>2015-10-16 11:48:55 -0400
commit2b5ec4a3c076bb1f18eeafbd96b0a80c6b8bfbaa (patch)
treee08561de76eb4939636d00317f8f5120b0db77e2 /web/react/utils
parent3c593af598b2bb986244099ed1b9a46ed3837911 (diff)
downloadchat-2b5ec4a3c076bb1f18eeafbd96b0a80c6b8bfbaa.tar.gz
chat-2b5ec4a3c076bb1f18eeafbd96b0a80c6b8bfbaa.tar.bz2
chat-2b5ec4a3c076bb1f18eeafbd96b0a80c6b8bfbaa.zip
Small refactor of websocket code on client and server
Diffstat (limited to 'web/react/utils')
-rw-r--r--web/react/utils/constants.jsx12
1 files changed, 12 insertions, 0 deletions
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx
index b7b8d3c60..b2e9bc6a7 100644
--- a/web/react/utils/constants.jsx
+++ b/web/react/utils/constants.jsx
@@ -47,6 +47,18 @@ module.exports = {
SERVER_ACTION: null,
VIEW_ACTION: null
}),
+
+ SocketEvents: {
+ POSTED: 'posted',
+ POST_EDITED: 'post_edited',
+ POST_DELETED: 'post_deleted',
+ CHANNEL_VIEWED: 'channel_viewed',
+ NEW_USER: 'new_user',
+ USER_ADDED: 'user_added',
+ USER_REMOVED: 'user_removed',
+ TYPING: 'user_typing'
+ },
+
SPECIAL_MENTIONS: ['all', 'channel'],
CHARACTER_LIMIT: 4000,
IMAGE_TYPES: ['jpg', 'gif', 'bmp', 'png', 'jpeg'],