PLT-3185 Added support for DMs in Channel Switcher (#3260)

* Added support for DMs

* Checked username beginning characters
Этот коммит содержится в:
David Lu
2016-06-06 10:54:23 -07:00
коммит произвёл Joram Wilander
родитель 26ec73d5d2
Коммит ea99cedb62
4 изменённых файлов: 41 добавлений и 4 удалений

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

@@ -1147,6 +1147,13 @@ export function getDirectChannelName(id, otherId) {
return handle;
}
export function getDirectChannelNameByUsername(username, otherUsername) {
const id = UserStore.getProfileByUsername(username).id;
const otherId = UserStore.getProfileByUsername(otherUsername).id;
return getDirectChannelName(id, otherId);
}
// Used to get the id of the other user from a DM channel
export function getUserIdFromChannelName(channel) {
var ids = channel.name.split('__');