Request nicklist using ptr instead of fullname

This commit is contained in:
Tor Hveem 2015-11-28 12:22:56 +01:00
parent 8e43758c2e
commit 4f686d512d
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);