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

TediCross fails to reply/edit/delete messages preserved by persistentMessageMap #373

Open
MyrTheMoth opened this issue Sep 12, 2023 · 1 comment

Comments

@MyrTheMoth
Copy link
Contributor

MyrTheMoth commented Sep 12, 2023

There's a peculiarity about persistentMessageMap, while it seems the ids are properly preserved and should function as intended when this feature is enabled, the discord side fails to execute actions with certain messages after a restart, it seems maybe discord.js needs those messages fetched/cached before using? it works fine telegram to discord, and if you simulate the queries on persistentMessageMap, it seems the issue is the discord side, here's some steps to reproduce the issue:

  • message on both telegram and discord
  • reply to each from both
  • reply to the replies on both
  • restart bot
  • try to reply to all messages on both sides
  • try to edit all messages on both sides
  • try to delete everything on the discord side with cross delete on

Some screenshots:

  • Before Restart
    image
    image

  • After Restart and Editing messages on both sides
    image
    image

  • After Restart and Cross Deleting all messages from Discord
    image

In these examples, only test 6 failed, but I've seen several messages fail after a restart, this was a base case scenario of sorts.

These examples also don't include attempts to reply to messages after restarting.

@MyrTheMoth MyrTheMoth changed the title Discord.js fails to relay messages preserved by persistentMessageMap TediCross fails to reply/edit/delete messages preserved by persistentMessageMap Sep 18, 2023
@Exzender
Copy link
Contributor

Tested this.
Here is what I can add.
If skipOldMessages: true - than none edits or deletes of old (persistent stored) messages are transferred from D to T after bot restart.
If skipOldMessages: false - than edits or delete only for LAST ONE old (persistent stored) message transferred from Discord to T.

I suppose that it's a specific behavior of Discord's system and can not be overridden.

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

No branches or pull requests

2 participants