Skip to Content

Merged from upstream 19 261110 01

Killed 379m merged
PR
#1336
PR Author
David Tran
Committer
David Tran
Commit
7f2db1dd8b2a
Branch
19.0
Age
Up-time
Commit message
[FIX] mail: keep the new mention search on a late answer

Steps to reproduce:
- In a chatter, type "@xxx" (no partner matches) and wait for the
search to be sent
- Before its answer comes back, replace it with "@Georges"

Georges is not suggested (unless the client already holds that partner),
and typing more letters does not search again until characters are
deleted.

The answer of a mention search is applied to the search that is current
when it arrives. When the user changed the search meanwhile, the empty
answer of "xxx" is recorded as the answer of "Georges", and the search
is cleared because that answer has no result. The fetch scheduled for
"Georges" then has nothing to search, and the next letters are taken as
narrowing a search already known to have no result.

This commit records the answer for the search that was fetched, and
clears the search only when it is still the one that was fetched.

The tour of project's test_05_project_sharing_chatter_mention_users
fails this way on a loaded machine: it waits exactly the 250ms debounce
between "@xxx" and "@Georges", so the answer of "xxx" can land after
"@Georges" is typed.

(cherry picked from commit c2b3f1631f1bf5cde4f2075dd774957a86a97049)