-
Notifications
You must be signed in to change notification settings - Fork 13k
chore(client): prevent federation actions for old federation #36957
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
18 commits
Select commit
Hold shift + click to select a range
8423998
chore: prevent invite links from federated rooms that are not native
ggazzo 1c14896
chore: prevent send message for non native federations rooms
ggazzo 8befb77
chore: update AddUsers component to utilize isRoomNativeFederated for…
ggazzo 11932f8
chore: enhance user addition logic to account for non-native federate…
ggazzo 8697684
chore: update moderator change logic to consider non-native federated…
ggazzo 6d56dd4
chore: refine change owner logic to incorporate checks for non-native…
ggazzo 6e5f6db
chore: update user removal logic to account for non-native federated …
ggazzo bdea01a
chore: implement composer for invalid version in non-native federated…
ggazzo aeecfcf
chore: add federation checks to message action components and members…
ggazzo f98df35
chore: add federation support to RoomsCachedStore and SubscriptionsCa…
ggazzo 6bf35ea
feat: enhance federation support by adding native federated room and …
ggazzo 2ee1b0d
chore: add INativeFederatedMessage interface and related type guard f…
ggazzo a2c2adc
refactor: update federation action logic to differentiate between nat…
ggazzo 772a086
fix: update type check for federation version in IUser interface to e…
ggazzo c83b6a8
chore: remove unit tests for BeforeFederationActions as part of code …
ggazzo f0184b6
fix lint
ggazzo 28c4551
feat: update ComposerFederationInvalidVersion to include external lin…
ggazzo c487d56
Apply suggestions from code review
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
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
21 changes: 21 additions & 0 deletions
21
...meteor/client/views/room/composer/ComposerFederation/ComposerFederationInvalidVersion.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import { ExternalLink } from '@rocket.chat/ui-client'; | ||
| import { MessageFooterCallout, MessageFooterCalloutContent } from '@rocket.chat/ui-composer'; | ||
| import type { ReactElement } from 'react'; | ||
| import { Trans } from 'react-i18next'; | ||
|
|
||
| const ComposerFederationInvalidVersion = (): ReactElement => { | ||
| return ( | ||
| <MessageFooterCallout> | ||
| <MessageFooterCalloutContent> | ||
| <Trans | ||
| i18nKey='Federation_Matrix_Federated_Description_invalid_version' | ||
| components={{ | ||
| 1: <ExternalLink to='https://go.rocket.chat/i/matrix-federation' />, | ||
| }} | ||
| /> | ||
| </MessageFooterCalloutContent> | ||
| </MessageFooterCallout> | ||
| ); | ||
| }; | ||
|
|
||
| export default ComposerFederationInvalidVersion; |
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.
Blocked legacy federation still falls back to non‑federated permissions (allows Invite/Add).
When
isFederationBlockedis true, we should not fall back to local permissions—deep links can still expose these actions.Also applies to: 62-66
🤖 Prompt for AI Agents