-
Notifications
You must be signed in to change notification settings - Fork 13k
feat: adds federation files support #36842
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
Merged
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
699b989
feat: adds files support
ricardogarim f4f98a3
chore: kek
ricardogarim 19e024e
chore: fixing conflicts
ricardogarim 876a36b
chore: fixing conflicts
ricardogarim ce6ff01
refactor: removes MatrixRemote file store
ricardogarim d690294
refactor: removes unused code
ricardogarim 5b5822e
refactor: makes files be sent into rc messages
ricardogarim 063ab06
chore: adds homeserver back to .gitignore
ricardogarim 80dff52
chore: improves code style
ricardogarim 2c92d4e
chore: removes duplicated IUpload type
ricardogarim f93a37b
chore: adds setFederationInfo into Upload model
ricardogarim e994863
chore: removes unneeded function wrapper
ricardogarim d193e10
chore: merges related functions
ricardogarim d9129a0
refactor: moves file download to homeserver
ricardogarim 9241741
feat: adds Federation canAccessMedia middleware (#36926)
ricardogarim 61c7d86
feat: adds canAccessMedia middleware
ricardogarim 7ba60f6
chore: makes federation sub props mandatory when federation prop exists
ricardogarim 815c435
refactor: moves errCodes to homeserver package
ricardogarim 940fa12
chore: changes thumbnail endpoint to return unrecognized
ricardogarim 7d886b4
chore: adds todo to handle multiple files
ricardogarim 6c8b824
chore: removes findByFederationMxcUri from uploads model
ricardogarim 46621c8
chore: adds comment to improve uploadFile typing to avoid db calls
ricardogarim bbd9669
refactor: makes getMatrixMessageType to use a dict
ricardogarim ca0e6e8
updates yarn.lock
ricardogarim 6382975
uses shared file types definition
ricardogarim bc342c8
fixes setFederationInfo typings
ricardogarim d7bdea4
returns file type when mimeType validation fails
ricardogarim 844a07c
fixes findLatestFederationThreadMessageByTmid signature
ricardogarim 20bb413
fixes broken type with encrypted rooms
ricardogarim 5b8de1e
code style
sampaiodiego 4eaeead
improve upload model to set federation
sampaiodiego f48c1ac
add TODOs
sampaiodiego b83f6cb
add index on uploads collection for mxcUri and serverName
ricardogarim 32e15a3
Merge remote-tracking branch 'origin/chore/federation-backup' into fe…
ggazzo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don’t blindly merge decrypted payload into the message; restrict to allowed keys
Object.assign(data, content) can overwrite reserved fields (e.g., t, rid, _id) if a crafted payload is decrypted. Limit merge to the fields we actually encrypt (msg, attachments, files, file).
Apply this diff:
📝 Committable suggestion
🤖 Prompt for AI Agents