diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-10-15 13:34:42 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-10-15 13:34:42 -0400 |
commit | f09685a37398da7808117b960321a14ab7989da7 (patch) | |
tree | ba26c3925482553465ba589ba009a2e74fb3f4c2 /web/react/utils/utils.jsx | |
parent | adc20981e2c370f09467d4fa249065d23f533a0a (diff) | |
parent | ae0d4dce7bc42f75568d65aa66c8db244f8f329f (diff) | |
download | chat-f09685a37398da7808117b960321a14ab7989da7.tar.gz chat-f09685a37398da7808117b960321a14ab7989da7.tar.bz2 chat-f09685a37398da7808117b960321a14ab7989da7.zip |
Merge pull request #1057 from hmhealey/plt520
PLT-520 Updated More Direct Channels modal and converted it to ReactBootstrap
Diffstat (limited to 'web/react/utils/utils.jsx')
-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('__'); |