Fix LMC autocompletion to suggest corrected message content #25
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/correct-autocompletion"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR fixes the
/correctcommand's autocompletion, which incorrectly suggests the original message content instead of the corrected content. The issue occurs becausechatwin_outgoing_msgonly updates the last message content for original messages, not corrections. The fix ensures corrected content is stored for autocompletion while preserving the original message ID, per XEP-0308. It also optimizes_chatwin_set_last_messageto avoid redundant memory operations and adds null checks for safety.Checklist
How to tests
/correctautocompletion with multiple corrections to ensure correct content is suggested.Fixes #24.