Closed Bug 1746863 Opened 2 years ago Closed 2 years ago

Incoming verification notification bar does not disappear after verification is completed

Categories

(Chat Core :: Security: OTR, defect)

Desktop
All
defect

Tracking

(thunderbird_esr91+ fixed, thunderbird96+ affected)

RESOLVED FIXED
97 Branch
Tracking Status
thunderbird_esr91 + fixed
thunderbird96 + affected

People

(Reporter: freaktechnik, Assigned: aleca)

References

Details

Attachments

(2 files, 1 obsolete file)

When verifying someone's identity in OTR the bar prompting you to verify it doesn't disappear after completing the procedure.

The following error also gets logged a lot, though that may be for all notification bars OTR shows:

JavaScript error: resource:///modules/OTRUI.jsm, line 695: TypeError: can't access property "setAttribute", notification.messageDetails is undefined
See Also: → 1734384
Assignee: nobody → alessandro

I'm having an issue I'm not sure is related to the whole OTR breakage.
When trying to start and encrypted conversation, I get this message inline the chat:

?OTRv2?
aleca-otr-test@kuix.de has requested an Off-the-Record (OTR) encrypted conversation.
However, you do not have a plugin to support that. See https://en.wikipedia.org/wiki/Off-the-Record_Messaging 
for more information.

What am I missing?

Flags: needinfo?(martin)

Nevermind, I needed to apply Magnus' patch to both instances of TB to make it work.

Flags: needinfo?(martin)

I'm working on this and I'm gonna push a WIP patch just so I can easily test it on multiple machines.
The notification usage of OTR is a bit messed up, specifically for the fact that we show it in the right sidebar, but then we sometimes use the notifications on top of the conversation for general requests, but then sometimes we hide them and sometimes we clear them, and so on.
Lots of inconsistencies and repeated code for no real reason.
I worked on this section in the past and I think it shows how little I properly understood the notifications API and how to use them in a sane way.

Anyway, I'm almost there with the fix, and should have it ready for tomorrow.

Status: NEW → ASSIGNED
Depends on: 1734384
See Also: 1734384
Attachment #9256259 - Attachment is patch: true
Summary: Incoming verification notification bar doers not disappear after verification is completed → Incoming verification notification bar does not disappear after verification is completed
Attachment #9256259 - Attachment is obsolete: true
Attachment #9256418 - Attachment description: WIP: Bug 1746863 - [OTR] Fix incoming verification notifications. → Bug 1746863 - [OTR] Fix incoming verification notifications.r=freaktechnik

Patch updated to make those notification usable again.
There are still a lot of things that need polishing and fixes, but this at least makes it usable.

Among all the changes, these are the most relevant:

  • I made all notification non-dismissable, except the final ones (success, fail, error).
  • I added the "Ignore" button for those notifications that require a verification action in order to properly close the encryption request when the user closes the notification.
  • I'm using the main notification area above the conversation pane, since notifications don't stack on top of each other anymore, we can use the same area for all chat related notifications.
  • All verification requests have a "WARNING" flag to look yellow. I think it's fine if we agree that the importance level of these requests is higher than a regular "INFO" level.

Let me know if I miss some use case, or if something looks wrong.

See Also: → 1746865
Target Milestone: --- → 97 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/49a1fbc3bd30
[OTR] Fix incoming verification notifications.r=freaktechnik

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

Comment on attachment 9256418 [details]
Bug 1746863 - [OTR] Fix incoming verification notifications.r=freaktechnik

[Approval Request Comment]
Regression caused by (bug #): didn't find the regression
User impact if declined: Off-the-record verification requests are unusable and it's impossible to start an encrypted conversation.
Testing completed (on c-c, etc.): on c-c
Risk to taking this patch (and alternatives if risky): it should be fairly low as OTR has been broken on 91 for some time.

Attachment #9256418 - Attachment description: Bug 1746863 - [OTR] Fix incoming verification notifications.r=freaktechnik → WIP: Bug 1746863 - [OTR] Fix incoming verification notifications.
Attachment #9256418 - Flags: approval-comm-esr91?
Attachment #9256418 - Flags: approval-comm-beta?

Comment on attachment 9256418 [details]
Bug 1746863 - [OTR] Fix incoming verification notifications.r=freaktechnik

Patch does not apply cleanly to esr91. Please provide a merged patch prior to asking for uplift.

Attachment #9256418 - Flags: approval-comm-esr91?

Comment on attachment 9256418 [details]
Bug 1746863 - [OTR] Fix incoming verification notifications.r=freaktechnik

No more 96 betas, so this will go out in 97 beta

Attachment #9256418 - Flags: approval-comm-beta?

There are a lot of substantial differences between 91 and trunk related to the chat code.
I'll need to create a dedicated 91 patch from scratch as the changes done on trunk don't translate at all to 91 due to many missing methods and missing files that have been added in the past months.
I'll work on this and ping Kai for a 91 specific review.

Marking this bug temporarily REOPENED so it's easier for me to track it.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #9256418 - Attachment description: WIP: Bug 1746863 - [OTR] Fix incoming verification notifications. → Bug 1746863 - [OTR] Fix incoming verification notifications.r=freaktechnik
Attached patch otr-fix-91.diffSplinter Review

Here's the updated patch for 91.
Lots of differences so it wasn't a complete 1 to 1 port, but everything seems to work as expected for the notifications.

Attachment #9258401 - Flags: review?(kaie)

Comment on attachment 9258401 [details] [diff] [review]
otr-fix-91.diff

Looks ok to me, the changes are similar to the reviewed comm-central patch, and a brief test with a local esr91 build gave me notifications that looked fine.

Attachment #9258401 - Flags: review?(kaie) → review+

Comment on attachment 9258401 [details] [diff] [review]
otr-fix-91.diff

re-requesting uplift (from Alessandro)

Attachment #9258401 - Flags: approval-comm-esr91?

Comment on attachment 9258401 [details] [diff] [review]
otr-fix-91.diff

[Triage Comment]
Approved for esr91

Attachment #9258401 - Flags: approval-comm-esr91? → approval-comm-esr91+
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: