Private message channels no longer refresh on creation/first use

Этот коммит содержится в:
Reed Garmsen
2015-08-14 17:12:02 -07:00
родитель fda8b01297
Коммит 2b80620cee
3 изменённых файлов: 62 добавлений и 6 удалений

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

@@ -438,6 +438,23 @@ module.exports.createChannel = function(channel, success, error) {
module.exports.track('api', 'api_channels_create', channel.type, 'name', channel.name);
};
module.exports.createPMChannelIfNotExists = function(channel, userId, success, error) {
$.ajax({
url: '/api/v1/channels/create_direct',
dataType: 'json',
contentType: 'application/json',
type: 'POST',
data: JSON.stringify({user_id: userId}),
success: success,
error: function(xhr, status, err) {
var e = handleError('createPMIfNotExists', xhr, status, err);
error(e);
}
});
module.exports.track('api', 'api_channels_create_direct', channel.type, 'name', channel.name);
};
module.exports.updateChannel = function(channel, success, error) {
$.ajax({
url: "/api/v1/channels/update",