Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Resolved linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur12-1610 committed Aug 16, 2022
1 parent 9870922 commit 82bf75f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 0 additions & 2 deletions cypress/e2e/knocking/knocking.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ limitations under the License.
/// <reference types="cypress" />

import { SynapseInstance } from "../../plugins/synapsedocker";
import { MatrixClient } from "../../global";
import Chainable = Cypress.Chainable;

function openCreateRoomDialog(): Chainable<JQuery<HTMLElement>> {
Expand Down Expand Up @@ -56,7 +55,6 @@ describe("Knocking", () => {

// Change room settings
cy.openRoomSettings("Security & Privacy");
cy.get(".mx_StyledRadioButton_content").contains("Ask to join").click();
cy.closeDialog();

//Check if the room settings are visible if labs flag is disabled
Expand Down
4 changes: 4 additions & 0 deletions src/TextForEvent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,10 @@ function textForJoinRulesEvent(ev: MatrixEvent, allowJSX: boolean): () => Render
return () => _t('%(senderDisplayName)s made the room invite only.', {
senderDisplayName,
});
case JoinRule.Knock:
return () => _t('%(senderDisplayName)s made the room knock only.', {
senderDisplayName,
});
case JoinRule.Restricted:
if (allowJSX) {
return () => <span>
Expand Down
3 changes: 3 additions & 0 deletions src/components/views/dialogs/CreateRoomDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
opts.joinRule = JoinRule.Restricted;
}

if (this.state.joinRule === JoinRule.Knock) {
opts.joinRule = JoinRule.Knock;
}
return opts;
}

Expand Down
1 change: 1 addition & 0 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@
"%(senderDisplayName)s upgraded this room.": "%(senderDisplayName)s upgraded this room.",
"%(senderDisplayName)s made the room public to whoever knows the link.": "%(senderDisplayName)s made the room public to whoever knows the link.",
"%(senderDisplayName)s made the room invite only.": "%(senderDisplayName)s made the room invite only.",
"%(senderDisplayName)s made the room knock only.": "%(senderDisplayName)s made the room knock only.",
"%(senderDisplayName)s changed who can join this room. <a>View settings</a>.": "%(senderDisplayName)s changed who can join this room. <a>View settings</a>.",
"%(senderDisplayName)s changed who can join this room.": "%(senderDisplayName)s changed who can join this room.",
"%(senderDisplayName)s changed the join rule to %(rule)s": "%(senderDisplayName)s changed the join rule to %(rule)s",
Expand Down

0 comments on commit 82bf75f

Please sign in to comment.