Merge pull request #683 from glowing-bear/nicklist-fixes

Request nicklist using ptr instead of fullname
This commit is contained in:
Lorenz Hübschle-Schneider 2015-11-28 12:30:49 +01:00
commit 870af58ed4
2 changed files with 6 additions and 3 deletions

View File

@ -282,10 +282,13 @@ weechat.factory('connection',
};
var requestNicklist = function(bufferId, callback) {
bufferId = bufferId || null;
// Prevent requesting nicklist for all buffers if bufferId is invalid
if (!bufferId) {
return;
}
ngWebsockets.send(
weeChat.Protocol.formatNicklist({
buffer: bufferId
buffer: "0x"+bufferId
})
).then(function(nicklist) {
handlers.handleNicklist(nicklist);

View File

@ -168,7 +168,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
// Send a request for the nicklist if it hasn't been loaded yet
if (!ab.nicklistRequested()) {
connection.requestNicklist(ab.fullName, function() {
connection.requestNicklist(ab.id, function() {
$scope.showNicklist = $scope.updateShowNicklist();
// Scroll after nicklist has been loaded, as it may break long lines
$rootScope.scrollWithBuffer(true);