fix(chatwin): Fix LMC autocompletion to suggest corrected message content
All checks were successful
CI / Check spelling (pull_request) Successful in 18s
CI / Check coding style (pull_request) Successful in 33s
CI / Linux (debian) (pull_request) Successful in 9m45s
CI / Linux (ubuntu) (pull_request) Successful in 10m0s
CI / Linux (arch) (pull_request) Successful in 16m48s

- Modified chatwin_outgoing_msg to call _chatwin_set_last_message for corrected messages, using replace_id per XEP-0308.
- Updated _chatwin_set_last_message to skip redundant and invalid free/strdup for same pointers.
- Added null checks in _chatwin_set_last_message for safety.
- Fixes autocompletion suggesting original message content instead of corrected content.

Fixes #24
This commit is contained in:
2025-09-02 00:29:13 +02:00
parent 51d2355d97
commit 2808def933
2 changed files with 16 additions and 7 deletions

View File

@@ -27,6 +27,9 @@ message_send(void **state)
assert_true(prof_output_regex("me: .+Hi there"));
}
// TODO: `/message correct` XEP-0308 compliance (whether each correction links to the original message ID)
// https://xmpp.org/extensions/xep-0308.html#rules
void
message_receive_console(void **state)
{