Fixed adding direct channels to the sidebar

Этот коммит содержится в:
Harrison Healey
2016-03-30 09:55:32 -04:00
родитель 2e9f5c7cf0
Коммит 55f3ae576d

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

@@ -1255,12 +1255,15 @@ export function windowHeight() {
}
export function openDirectChannelToUser(user, successCb, errorCb) {
AsyncClient.savePreference(
Constants.Preferences.CATEGORY_DIRECT_CHANNEL_SHOW,
user.id,
'true'
);
const channelName = this.getDirectChannelName(UserStore.getCurrentId(), user.id);
let channel = ChannelStore.getByName(channelName);
const preference = PreferenceStore.setPreference(Constants.Preferences.CATEGORY_DIRECT_CHANNEL_SHOW, user.id, 'true');
AsyncClient.savePreferences([preference]);
if (channel) {
if ($.isFunction(successCb)) {
successCb(channel, true);