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

[BUG] Not being able to react to anonreplies ( message cant be found ) #2920

Closed
lorenzo132 opened this issue Dec 24, 2020 · 4 comments
Closed
Labels
bug This is a confirmed bug staged Staged for next version

Comments

@lorenzo132
Copy link
Member

lorenzo132 commented Dec 24, 2020

Describe the bug
Reactions cannot be added to anonreply's

Bot Info
Bot version (check with @modmail about): 3.7.14dev16 - 3.7.13
Host method (Heroku, self-host, etc): Heroku, vps

To Reproduce
Steps to reproduce the behavior:

  1. Who can reproduce (ex. anyone, owners)? Anyone with access to reply in threads / that can dm the modmail
  2. Where can it be reproduced (ex. in thread channels, recipient DM's)? In dm's and the thread channel.
  3. Done what to cause the error? Send a message using anonreply and try to add a reaction to that message
  4. Any recently made changes to your bot? No changes were made.
  5. Errored

Error Logs
If your Modmail bot is online, type @modmail debug hastebin and include the link here. https://hastebin.cc/ulivocuyar

2020-12-24 12:19:57 main[1197] - WARNING: Failed to find linked message for reactions: Thread channel message not found.

Screenshots
Add screenshots to help explain your problem.
Message in DM: https://cdn.discordapp.com/attachments/670653022317182991/791762588500623420/CK4Y14Us.png
Message in thread: https://cdn.discordapp.com/attachments/670653022317182991/791762590112022548/FG4EErQY.png

Additional context
Add any other context about the problem here.

@lorenzo132 lorenzo132 added the maybe: bug An unconfirmed bug label Dec 24, 2020
@ririko5834
Copy link

Same problem, I am getting this often in console

@Jerrie-Aries
Copy link
Contributor

Jerrie-Aries commented Dec 27, 2020

I know what causes this error, and I guess I found a solution for it.

It was because author.url for anon reply in thread channel and author.url in DM channel are different.

For example:
-Author URL in thread channel:
https://discordapp.com/users/6090xxxxx279005205#792896547163209738
-Author URL in DM channel:
https://discordapp.com/channels/6684xxxxx365892109#792896547163209738

However the ID in both URLs are still the same but we don't have a block of code in 'find_linked_message_from_dm' function to compare those IDs, like we have in 'find_linked_message' function.

So what I did to solve this was I added couple lines of codes in 'find_linked_message_from_dm' to compare those IDs. See the image.
Untitled

Maybe you guys can check that out.

@fourjr
Copy link
Collaborator

fourjr commented Jan 2, 2021

Hey, it would be great if you can create a pull request, appropriate credit will be given.

@fourjr fourjr added bug This is a confirmed bug staged Staged for next version and removed maybe: bug An unconfirmed bug labels Jan 2, 2021
@Jerrie-Aries
Copy link
Contributor

Hey, I'm sorry about this but I'm not really sure how Git flow works. Ha-ha. I'm afraid I'd mess something up...lol.
Since it's been done already, so no worries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is a confirmed bug staged Staged for next version
Projects
None yet
Development

No branches or pull requests

4 participants