Updated More Direct Channels modal and converted it to ReactBootstrap

Этот коммит содержится в:
hmhealey
2015-10-14 16:57:03 -04:00
родитель 6c4022337c
Коммит ae0d4dce7b
5 изменённых файлов: 345 добавлений и 136 удалений

Просмотреть файл

@@ -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('__');