Changed direct messages channels so users can show/hide them

Этот коммит содержится в:
hmhealey
2015-10-02 14:25:55 -04:00
родитель 7d03c24b44
Коммит ed31538893
5 изменённых файлов: 142 добавлений и 163 удалений

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

@@ -666,3 +666,27 @@ export function getDirectChannels() {
);
}
export function setPreferences(preferences, success, error) {
client.setPreferences(
preferences,
(data, textStatus, xhr) => {
if (xhr.status !== 304) {
AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_PREFERENCES,
preferences
});
}
if (success) {
success(data);
}
},
(err) => {
dispatchError(err, 'setPreferences');
if (error) {
error();
}
}
);
}