mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 13:36:30 +03:00
Fix #7435 For most messages, `calc_sort_timestamp()` makes sure that they are at the correct place; esp. that they are not above system messages or other noticed/seen messages. Most callers of `add_info_msg()`, however, didn't call `calc_sort_timestamp()`, and just used `time()` or `smeared_time()` to get the sort timestamp. Because of this, system messages could sometimes wrongly be sorted above other messages. This PR fixes this by making the sort timestamp optional in `add_info_msg*()`. If the sort timestamp isn't passed, then the message is sorted to the bottom of the chat. `sent_rcvd_timestamp` is not optional anymore, because we need _some_ timestamp that can be shown to the user (most callers just pass `time()` there).
10 lines
664 B
Plaintext
10 lines
664 B
Plaintext
Group#Chat#6002: Group [3 member(s)]
|
|
--------------------------------------------------------------------------------
|
|
Msg#6003: info (Contact#Contact#Info): Messages are end-to-end encrypted. [NOTICED][INFO]
|
|
Msg#6004: info (Contact#Contact#Info): alice@example.org invited you to join this group.
|
|
|
|
Waiting for the device of alice@example.org to reply… [NOTICED][INFO]
|
|
Msg#6006: info (Contact#Contact#Info): alice@example.org replied, waiting for being added to the group… [NOTICED][INFO]
|
|
Msg#6008🔒: (Contact#Contact#6001): Member Me added by alice@example.org. [FRESH][INFO]
|
|
--------------------------------------------------------------------------------
|