-
Notifications
You must be signed in to change notification settings - Fork 6
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
Allow intradef users to invite users from other homeserver in a private room #446
Allow intradef users to invite users from other homeserver in a private room #446
Conversation
…e room by default
src/util/TchapUtils.ts
Outdated
@@ -35,7 +35,7 @@ export default class TchapUtils { | |||
// Only show the federate switch to defense users : it's difficult to understand, so we avoid | |||
// displaying it unless it's really necessary. | |||
if (baseDomain === 'agent.intradef.tchap.gouv.fr') { | |||
return { showRoomFederationOption: true, roomFederationDefault: false }; | |||
return { showRoomFederationOption: true, roomFederationDefault: true }; |
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.
@aulamber In case of "forum" default is false, in case private room (external or not, it's always federation default)
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.
Maybe you can change the isFederation : this.setState({ tchapRoomType: tchapRoomType }); if the room type isn't public room, isFederated is set to true.
It will be better to enforce the federation parameter at moment of the room is creation (I haven't found were is the code of that).
Close #370 |
private onCancel = () => { | ||
this.props.onFinished(false); | ||
}; | ||
|
||
private onFederatedChange = (isFederated: boolean) => { | ||
this.setState({ isFederated: isFederated }); | ||
private onFederatedChange = (isForumFederated: boolean) => { |
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.
onForumFederatedChange
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.
Modified
const cli = MatrixClientPeg.get(); | ||
const baseDomain = cli.getDomain(); | ||
|
||
// Only show the federate switch to defense users : it's difficult to understand, so we avoid | ||
// displaying it unless it's really necessary. | ||
if (baseDomain === 'agent.intradef.tchap.gouv.fr') { | ||
return { showRoomFederationOption: true, roomFederationDefault: false }; |
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.
it should be : {showForumFederationSwitch: true, forumFederationSwitchDefaultValue: false}
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.
Modified
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.
-
isFederated est setup dans 2 tests, hors la propriété a été supprimé
-
Je ne comprends pas comment la valeur par defaut forumFederationSwitchDefaultValue est vrai quand on n'est pas sur le serveur intradef
Je lance une review app pour tester |
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.
I would rename method isSelectedRoomFederated
in isSelectedRoomForumAndFederated
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.
C'est bon, j'ai testé sur la review app sur l'instance intradef et interieur en créé des salons et des forums, ça a marché correctement
@aulamber il manque quoi pour merger ? |
En fait non, parce que ca peut etre n'importe quelle room qui peut etre federee, pas seulement le forum :) |
Cf. issue #370
To reproduce the bugfix:
Cf. before there was a popin saying: