Bot Version
v4.2.1
How are you hosting Modmail?
Other
Error Logs
No error
Screenshots
No response
Additional Information
Some messages are logged twice, one as "thread_message" and one as "internal".
How to reproduce :
- Create a thread with Modmail
- Send a reply from the channel created to the user
- You should see the message twice (if you look up the DB or logviewer), the message however, only appears one time in the thread conversation.
Intended :
- The message should only appear once.
Leads :
After reviewing the code from development, the issue has been introduced in v4.2.0. This seems connected to a functions that handles forwarded messages from the bot.py file, lines 1495-1506.
I assume that this function should only be triggered on forwarded messages but is always called, resulting in a duplicated log (as I said, one "internal" and the other "thread_message" as it should be normally).
I'll we happy to resolve this but I'm struggling to understand the real purpose of the code, if we can talk about it.