Added feature to the 'More...' PM channel list and fixed small cosmetic issues

Этот коммит содержится в:
Reed Garmsen
2015-08-14 18:26:09 -07:00
родитель 56eeb2f6ef
Коммит f2b06cfc7c
5 изменённых файлов: 72 добавлений и 40 удалений

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

@@ -964,4 +964,17 @@ module.exports.generateId = function() {
module.exports.isBrowserFirefox = function() {
return navigator && navigator.userAgent && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
}
};
// Used to get the id of the other user from a DM channel
module.exports.getUserIdFromChannelName = function(channel) {
var ids = channel.name.split('__');
var otherUserId = '';
if (ids[0] === UserStore.getCurrentId()) {
otherUserId = ids[1];
} else {
otherUserId = ids[0];
}
return otherUserId;
};