diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-10-14 16:57:03 -0400 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-10-14 16:57:08 -0400 |
commit | ae0d4dce7bc42f75568d65aa66c8db244f8f329f (patch) | |
tree | cc71a6d0fa48dc592b2ce4aa9f2cdec67bfb339d /web/react/utils | |
parent | 6c4022337cc097efcf33bd9eb61183eaa566f830 (diff) | |
download | chat-ae0d4dce7bc42f75568d65aa66c8db244f8f329f.tar.gz chat-ae0d4dce7bc42f75568d65aa66c8db244f8f329f.tar.bz2 chat-ae0d4dce7bc42f75568d65aa66c8db244f8f329f.zip |
Updated More Direct Channels modal and converted it to ReactBootstrap
Diffstat (limited to 'web/react/utils')
-rw-r--r-- | web/react/utils/utils.jsx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 8f697a9c5..f93fe02e4 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -911,6 +911,18 @@ export function isBrowserEdge() { return window.naviagtor && navigator.userAgent && navigator.userAgent.toLowerCase().indexOf('edge') > -1; } +export function getDirectChannelName(id, otherId) { + let handle; + + if (otherId > id) { + handle = id + '__' + otherId; + } else { + handle = otherId + '__' + id; + } + + return handle; +} + // Used to get the id of the other user from a DM channel export function getUserIdFromChannelName(channel) { var ids = channel.name.split('__'); |