TB chat: buddy-authorization-request broken, "box.appendNotification is not a function"
Categories
(Thunderbird :: Instant Messaging, defect)
Tracking
(Not tracked)
People
(Reporter: KaiE, Assigned: mkmelin)
References
Details
(Keywords: regression)
Attachments
(1 file)
(deleted),
patch
|
KaiE
:
review+
|
Details | Diff | Splinter Review |
Seen with current comm-central trunk.
Incoming buddy auth requests are broken.
No UI is shown.
Console has this error:
TypeError: box.appendNotification is not a function chat-messenger.js:1043:11
observe chrome://messenger/content/chat/chat-messenger.js:1043
addBuddyRequest resource:///modules/jsProtoHelper.jsm:166
onPresenceStanza resource:///modules/xmpp.jsm:1795
accountListening resource:///modules/xmpp-session.jsm:667
endElement resource:///modules/xmpp-xml.jsm:425
onDataAvailable resource:///modules/xmpp-xml.jsm:354
onDataReceived resource:///modules/xmpp-session.jsm:313
_handleQueue resource:///modules/socket.jsm:423
_handleQueue self-hosted:995
Ignore line numbers, I have local changes in chat-messenger.js
I hope this isn't related to the changes I'm porting? Can you confirm this bug?
if (aTopic == "buddy-authorization-request") {
aSubject.QueryInterface(Ci.prplIBuddyRequest);
let bundle = document.getElementById("chatBundle");
let label = bundle.getFormattedString("buddy.authRequest.label",
[aSubject.userName]);
let value =
"buddy-auth-request-" + aSubject.account.id + aSubject.userName;
let acceptButton = {
accessKey: bundle.getString("buddy.authRequest.allow.accesskey"),
label: bundle.getString("buddy.authRequest.allow.label"),
callback() { aSubject.grant(); },
};
let denyButton = {
accessKey: bundle.getString("buddy.authRequest.deny.accesskey"),
label: bundle.getString("buddy.authRequest.deny.label"),
callback() { aSubject.deny(); },
};
let box = document.getElementById("chatTabPanel");
-> box.appendNotification(label, value, null, box.PRIORITY_INFO_HIGH,
[acceptButton, denyButton]);
Assignee | ||
Comment 1•6 years ago
|
||
This is due to the notification box de-xbl they did in core a while back. We have the old xbl-notification forked in common/ - but nobody yet hooked chat up to use that. So chat is currently missing some notifications.
Updated•6 years ago
|
Updated•6 years ago
|
Comment 2•6 years ago
|
||
Magnus, do you know what's necessary to hook the chat code up to use the forked code?
Assignee | ||
Comment 3•6 years ago
|
||
Actually, I was likely wrong about that, the forked binding should be hooked up.
I think the problem is that we have two elements with the same id="chatTabPanel"
... and it's getting the wrong one now. Blame doesn't easily show me where this got messed up. Possibly already in the overlay changes a year ago
https://searchfox.org/comm-central/search?q=chatTabPanel&path=
Assignee | ||
Comment 4•6 years ago
|
||
I'm not sure there's an easy way to trigger these notifications. Does this fix it for you?
Assignee | ||
Updated•6 years ago
|
Reporter | ||
Comment 5•6 years ago
|
||
Reporter | ||
Updated•6 years ago
|
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/0926693124ee
fix chat "box.appendNotification is not a function". r=kaie
Updated•6 years ago
|
Description
•