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

Discord authenticated attachments #112

Open
khakers opened this issue Sep 29, 2023 · 4 comments
Open

Discord authenticated attachments #112

khakers opened this issue Sep 29, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@khakers
Copy link
Owner

khakers commented Sep 29, 2023

Discord has just announced they will soon be adding additional authentication parameters to attachments. Without significant change, this will result in all attachments becoming unusable after an unknown (likely short) period of time even when the thread is still open.

The easiest option is probably to patch modmail to store images as base64 in the database (though this will hugely inflate its size). This is the best solution for downloaded transcripts in html format since the file will contain everything it needs to work.

Modmail viewer should have the required information to get messages from discord, so it could renew links for open threads on its own.

There's also the option of S3 and file system storage, but these would likely require more work for modmail and the viewer.

@khakers
Copy link
Owner Author

khakers commented Nov 5, 2023

From Discord:

When will the change go out?
The URL parameter change will be a gradual rollout that may adjust based on identified user impact. The earliest the rollout will begin no earlier than December 15. As the change is rolling out, we will be monitoring developer and end-user impact to ensure that the client experience is not breaking in unintended ways.

@khakers
Copy link
Owner Author

khakers commented Nov 7, 2023

It doesn't look like it will be too hard to do in database attachment storage. Prospective plan is to add this to my fork, OpenModmail, (name pending) as the default attachment backend, and look into some better solutions in the future.

@khakers
Copy link
Owner Author

khakers commented Nov 11, 2023

khakers/OpenModmail#3

@khakers
Copy link
Owner Author

khakers commented Jan 6, 2024

Initial implementation is done for OpenModmail with both an S3 handler and MongoDB in database store

@khakers khakers added the enhancement New feature or request label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant