Skip to content

[BUG]: Duplicates logs for some messagesΒ #3427

@ImPoulpitos

Description

@ImPoulpitos

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis is a confirmed bugin progressstagedStaged for next version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions