Merge pull request #5059 from pichalite/patch-1

redirect to correct route on Chats.leave
This commit is contained in:
Barış Soner Uşaklı
2016-09-27 10:54:07 +03:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -290,7 +290,7 @@ define('forum/chats', [
return app.alertError(err.message);
}
if (parseInt(roomId, 10) === ajaxify.data.roomId) {
ajaxify.go('chats');
ajaxify.go('user/' + ajaxify.data.userslug + '/chats');
} else {
el.remove();
}

View File

@@ -75,7 +75,7 @@ define('forum/chats/search', ['components'], function(components) {
return app.alertError(err.message);
}
if (roomId) {
ajaxify.go('chats/' + roomId);
Chats.switchChat(roomId);
} else {
app.newChat(userObj.uid);
}
@@ -84,4 +84,4 @@ define('forum/chats/search', ['components'], function(components) {
}
return search;
});
});