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

Change wording of 'invite anyway' setting #2450

Merged
merged 1 commit into from
Jan 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/structures/UserSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const SIMPLE_SETTINGS = [
{ id: "pinMentionedRooms" },
{ id: "pinUnreadRooms" },
{ id: "showDeveloperTools" },
{ id: "alwaysInviteUnknownUsers" },
{ id: "promptBeforeInviteUnknownUsers" },
];

// These settings must be defined in SettingsStore
Expand Down
8 changes: 4 additions & 4 deletions src/components/views/dialogs/AskInviteAnywayDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default React.createClass({
},

_onInviteNeverWarnClicked: function() {
SettingsStore.setValue("alwaysInviteUnknownUsers", null, SettingLevel.ACCOUNT, true);
SettingsStore.setValue("promptBeforeInviteUnknownUsers", null, SettingLevel.ACCOUNT, false);
this.props.onInviteAnyways();
this.props.onFinished(true);
},
Expand All @@ -58,7 +58,7 @@ export default React.createClass({
contentId='mx_Dialog_content'
>
<div id='mx_Dialog_content'>
<p>{_t("The following users may not exist - would you like to invite them anyways?")}</p>
<p>{_t("Unable to find profiles for the Matrix IDs listed below - would you like to invite them anyway?")}</p>
<ul>
{ errorList }
</ul>
Expand All @@ -69,10 +69,10 @@ export default React.createClass({
{ _t('Close') }
</button>
<button onClick={this._onInviteNeverWarnClicked}>
{ _t('Invite anyways and never warn me again') }
{ _t('Invite anyway and never warn me again') }
</button>
<button onClick={this._onInviteClicked} autoFocus="true">
{ _t('Invite anyways') }
{ _t('Invite anyway') }
</button>
</div>
</BaseDialog>
Expand Down
10 changes: 6 additions & 4 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@
"Failed to invite": "Failed to invite",
"Failed to invite users to the room:": "Failed to invite users to the room:",
"Failed to invite the following users to the %(roomName)s room:": "Failed to invite the following users to the %(roomName)s room:",
"Waiting for %(userId)s to accept...": "Waiting for %(userId)s to accept...",
"Waiting for %(userId)s to confirm...": "Waiting for %(userId)s to confirm...",
"You need to be logged in.": "You need to be logged in.",
"You need to be able to invite users to do that.": "You need to be able to invite users to do that.",
"Unable to create widget.": "Unable to create widget.",
Expand Down Expand Up @@ -293,7 +295,7 @@
"Pin unread rooms to the top of the room list": "Pin unread rooms to the top of the room list",
"Enable widget screenshots on supported widgets": "Enable widget screenshots on supported widgets",
"Show empty room list headings": "Show empty room list headings",
"Always invite users which may not exist": "Always invite users which may not exist",
"Prompt before sending invites to potentially invalid matrix IDs": "Prompt before sending invites to potentially invalid matrix IDs",
"Show developer tools": "Show developer tools",
"Collecting app version information": "Collecting app version information",
"Collecting logs": "Collecting logs",
Expand Down Expand Up @@ -885,9 +887,9 @@
"You have entered an invalid address.": "You have entered an invalid address.",
"Try using one of the following valid address types: %(validTypesList)s.": "Try using one of the following valid address types: %(validTypesList)s.",
"The following users may not exist": "The following users may not exist",
"The following users may not exist - would you like to invite them anyways?": "The following users may not exist - would you like to invite them anyways?",
"Invite anyways and never warn me again": "Invite anyways and never warn me again",
"Invite anyways": "Invite anyways",
"Unable to find profiles for the Matrix IDs listed below - would you like to invite them anyway?": "Unable to find profiles for the Matrix IDs listed below - would you like to invite them anyway?",
"Invite anyway and never warn me again": "Invite anyway and never warn me again",
"Invite anyway": "Invite anyway",
"Preparing to send logs": "Preparing to send logs",
"Logs sent": "Logs sent",
"Thank you!": "Thank you!",
Expand Down
6 changes: 3 additions & 3 deletions src/settings/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,10 @@ export const SETTINGS = {
displayName: _td('Show empty room list headings'),
default: true,
},
"alwaysInviteUnknownUsers": {
"promptBeforeInviteUnknownUsers": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
displayName: _td('Always invite users which may not exist'),
default: false,
displayName: _td('Prompt before sending invites to potentially invalid matrix IDs'),
default: true,
},
"showDeveloperTools": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
Expand Down
4 changes: 2 additions & 2 deletions src/utils/MultiInviter.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default class MultiInviter {
if (addrType === 'email') {
return MatrixClientPeg.get().inviteByEmail(roomId, addr);
} else if (addrType === 'mx-user-id') {
if (!ignoreProfile && !SettingsStore.getValue("alwaysInviteUnknownUsers", this.roomId)) {
if (!ignoreProfile && SettingsStore.getValue("promptBeforeInviteUnknownUsers", this.roomId)) {
try {
const profile = await MatrixClientPeg.get().getProfileInfo(addr);
if (!profile) {
Expand Down Expand Up @@ -204,7 +204,7 @@ export default class MultiInviter {
Promise.all(promises).then(() => this.deferred.resolve(this.completionStates));
};

if (SettingsStore.getValue("alwaysInviteUnknownUsers", this.roomId)) {
if (!SettingsStore.getValue("promptBeforeInviteUnknownUsers", this.roomId)) {
inviteUnknowns();
return;
}
Expand Down