Skip to content

Files get renamed according to mimetype when this shouldn't be done. #178

@SwirlyStone5877

Description

@SwirlyStone5877

Describe the bug
When sending files from Matrix to protocols that don't support attachments (e.g. IRC, XMPP, or in our case sshchat), the file that gets downloaded to MediaDownloadPath is renamed to have an extension that matches the mimetype. However, on some files this shouldn't be done, e.g. .fur files (Furnace Tracker) or .vgm files

To Reproduce
Steps to reproduce the behavior:

  • Send a file with a bridge linked to a protocol with no attachment support
  • Watch it be renamed when downloaded to MediaDownloadPath

Expected behavior
It not being renamed.

Screenshots/debug logs
Screenshot from nheko (Matrix client):
https://fs.swirly.architectenterprises.net/screenshot_z060OvuDHn94wEDk.png
Screenshot from sshchat (provided by third party on MINGW):
https://fs.swirly.architectenterprises.net/clipboard.png

Environment (please complete the following information):

  • OS: Linux on my end, Windows on file sender's end and bridge hoster's end
  • Matterbridge version: 1.26.1-dev 6d468ad (GitHub actions)

Additional context
Configuration file: https://fs.swirly.architectenterprises.net/matterbridgeobfuscated.toml

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions