odoo/odoo#189323

Created by fw-bot
Merged at e82929b18756c2ba25821064fa1c9b6cdd52bfb3

Statuses:

label
odoo-dev:18.0-saas-17.4-fix_scroll_to_unknown-tsm-58HJ-fw
head
d5c4cc53d00baae64baddbed6c423fa01737f8e0
merged
1 year ago by Discuss, Matthieu Stockbauer (tsm)
odoo/odoo
saas-17.4 #189282
18.0 #189323
saas-18.2
saas-18.3
saas-18.4
19.0
master #189382

[FW][FIX] mail: scroll to not yet loaded pinned message

Before this PR, clicking on the "user pinned a message to the channel" notification linked to a not yet loaded message would not scroll to the pinned message.

This issue arises because the highlightMessage function does nothing if the message's thread is different from the current one. However, when a message is unknown, the thread is also unknown, and the function does nothing.

The notification is only displayed in the origin thread of the message, so we can safely pass this information, assuming the message thread and the notification thread are the same.

Forward-Port-Of: #189282