Skip to content

MessageLogger: Fix message history loss on reconnect + unloaded channels - #4612

Open
reservedbytes wants to merge 2 commits into
Vendicated:devfrom
reservedbytes:messagelogger-unloaded-channels
Open

reservedbytes wants to merge 2 commits into
Vendicated:devfrom
reservedbytes:messagelogger-unloaded-channels

Conversation

@reservedbytes

Copy link
Copy Markdown
Contributor

Describe your Changes

I noticed that if someone sent me a message and then deleted it, the logger didn´t log it at all, after some reverse engineering (which also made me find another problem included in this PR which is losing messages after a reconnect), I found out that Discord only stores messages for channels that are ready.
Because my account is in ~150 servers, it was giving me an average of ~0.25 messages per second, to prevent the plugin from eating the memory very quickly with loads of unwanted modified/deleted messages, I made a simple memory filter for DMs and servers where you´ve opened any channel in the current session.

Screenshots (if applicable)

Not applicable

Checklist before submitting

  • I have read the CONTRIBUTING.md file and made sure this pull request complies with it
  • This pull request was written by me, and not an AI agent.
  • I understand that if any of the above conditions are not met, this pull request will be closed and I will be banned from future contributions without further warning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant