Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message ID mess #135

Closed
singularis-mzf opened this issue Jan 28, 2024 · 2 comments · Fixed by #137
Closed

Message ID mess #135

singularis-mzf opened this issue Jan 28, 2024 · 2 comments · Fixed by #137
Labels
Bug Something isn't working Release blocker No release until this is closed
Milestone

Comments

@singularis-mzf
Copy link
Contributor

singularis-mzf commented Jan 28, 2024

When a single message in inbox is selected and a new message is created, the new message will take an ID of the selected message, which causes multiple kind of wierd behaviour when the new message is sent like:

  • When the message is sent, the original message (even completely unrelated) disappers from the inbox.
  • When the selected message has multiple to-players and reply-all function has been used on it, the reply message will have the same ID as the original message which will cause conflicts in inboxes of other recipients who already have the original message there (they will not be able to select one of the messages independently).
  • And so on...

The cause is this newly added code in mail/ui/compose.lua:

if mail.selected_idxs.message[name] then
    id = mail.selected_idxs.message[name]
end

There is a code in mail.show_compose() that tries to save the id for the message, but if the id parameter is nil (which it is in most of the cases), the original id of the originally selected message is preserved. Maybe to generate a new ID in mail.show_compose() instead of waiting for a callback will help.

@BuckarooBanzay BuckarooBanzay added the Bug Something isn't working label Jan 28, 2024
@BuckarooBanzay
Copy link
Member

I'll try to address this next time i feel like working on this mod, PR's are always open by the way 😉

singularis-mzf added a commit to singularis-mzf/mail that referenced this issue Jan 28, 2024
@S-S-X S-S-X linked a pull request Jan 28, 2024 that will close this issue
@Athozus Athozus added this to the 1.4.0 milestone Jan 28, 2024
@Athozus Athozus added the Release blocker No release until this is closed label Jan 28, 2024
@Athozus
Copy link
Member

Athozus commented Jan 28, 2024

We have problems with message IDs since the last release, I will make an utility to fix the storage, and it will certainly fix many bugs at once. Thanks anyway for reporting 👍

Athozus added a commit that referenced this issue Feb 1, 2024
* fix for bugs #135 and #136

* Fix indentation in ui/compose.lua

Co-authored-by: SX <[email protected]>

---------

Co-authored-by: Athozus <[email protected]>
Co-authored-by: SX <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Release blocker No release until this is closed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants