Closed Bug 1552256 Opened 6 years ago Closed 5 years ago

OTR, buddy right click, "add OTR fingerprint" for online contacts is broken

Categories

(Chat Core :: Security: OTR, defect)

defect
Not set
normal

Tracking

(thunderbird68 fixed, thunderbird69 fixed)

RESOLVED FIXED
Instantbird 69
Tracking Status
thunderbird68 --- fixed
thunderbird69 --- fixed

People

(Reporter: KaiE, Assigned: aleca)

References

Details

Attachments

(1 file, 2 obsolete files)

In the original code snapshot (pre-review), the right-click menu entry "add contact's OTR fingerprint" was shown for offline contact's, only.

Today during testing I saw that the menu item is present for online contacts, too.

However, it's broken. When selecting it, I get error "TypeError: contact.preferredBuddy is undefined"

For now, as an immediate bugfix (after bug 1518172 landed), I suggest to NOT show the menu for online contacts.

Summary: OTR, buddy right click, add OTR fingerprint, fix for online contacts → OTR, buddy right click, "add OTR fingerprint" for online contacts is broken

I'm taking care of this, which is related to Bug 1549935

Upon right clicking on a contact's name I'm getting this console warning.
console.warn: "[fluent] Missing translations in en-US: buddycontextmenu.label."

Kai, I know you converted the translatable strings to Fluent, is this something you can take care of or point me to the right direction?

Flags: needinfo?(kaie)

After further investigation, the TypeError: contact.preferredBuddy is undefined warning appears only if the conversation with that contact is open, independently if the contact is online or offline.

Attached patch otr-buddy-right-click.patch (obsolete) — Splinter Review
Attachment #9067849 - Flags: review?(mkmelin+mozilla)
Attachment #9067849 - Flags: review?(kaie)
Comment on attachment 9067849 [details] [diff] [review] otr-buddy-right-click.patch Review of attachment 9067849 [details] [diff] [review]: ----------------------------------------------------------------- Looks a bit weird with the declarations. Can we change these (both) to be if (contact.buddy) { return { } } return { } Also add a comment about online/offline?
Attached patch otr-buddy-right-click.patch (obsolete) — Splinter Review
Attachment #9067849 - Attachment is obsolete: true
Attachment #9067849 - Flags: review?(mkmelin+mozilla)
Attachment #9067849 - Flags: review?(kaie)
Attachment #9067865 - Flags: review?(mkmelin+mozilla)
Attachment #9067865 - Flags: review?(kaie)
Status: NEW → ASSIGNED
Attachment #9067865 - Flags: review?(mkmelin+mozilla) → review+

(In reply to Alessandro Castellani (:aleca) from comment #1)

Upon right clicking on a contact's name I'm getting this console warning.
console.warn: "[fluent] Missing translations in en-US: buddycontextmenu.label."

buddycontextmenu.label must be changed in OTRUI.jsm to buddycontextmenu-label

Flags: needinfo?(kaie)
Attachment #9067865 - Attachment is obsolete: true
Attachment #9067865 - Flags: review?(kaie)
Attachment #9067898 - Flags: review+
Attachment #9067898 - Flags: approval-comm-beta?
Keywords: checkin-needed

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/2e120efeddbf
Fix "Add Contact's OTR Fingerprint" for contact with open conversation. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED

I was agonising a bit over the commit message here. Even as a non-native English speaker "opened conversation" sounds wrong. The adjective is "open". "Opened" is used in "Juliet opened her eyes and saw, oh dear, ..." - https://dictionary.cambridge.org/grammar/british-grammar/open-or-opened. Or maybe that's another "Americanism".

Target Milestone: --- → Instantbird 69
Attachment #9067898 - Flags: approval-comm-beta? → approval-comm-beta+
Component: General → Security: OTR
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: