{sectionName}
@@ -452,6 +570,10 @@ export default class DMInviteDialog extends React.PureComponent {
}
}
+ // Now we mix in the additional members. Again, we presume these have already been filtered. We
+ // also assume they are more relevant than our suggestions and prepend them to the list.
+ sourceMembers = [...additionalMembers, ...sourceMembers];
+
// If we're going to hide one member behind 'show more', just use up the space of the button
// with the member's tile instead.
if (showNum === sourceMembers.length - 1) showNum++;
@@ -510,6 +632,40 @@ export default class DMInviteDialog extends React.PureComponent {
);
}
+ _renderIdentityServerWarning() {
+ if (!this.state.tryingIdentityServer || this.state.canUseIdentityServer) {
+ return null;
+ }
+
+ const defaultIdentityServerUrl = getDefaultIdentityServerUrl();
+ if (defaultIdentityServerUrl) {
+ return (
+
{_t(
+ "Use an identity server to invite by email. " +
+ "
Use the default (%(defaultIdentityServerName)s) " +
+ "or manage in
Settings.",
+ {
+ defaultIdentityServerName: abbreviateUrl(defaultIdentityServerUrl),
+ },
+ {
+ default: sub =>
{sub},
+ settings: sub =>
{sub},
+ },
+ )}
+ );
+ } else {
+ return (
+
{_t(
+ "Use an identity server to invite by email. " +
+ "Manage in
Settings.",
+ {}, {
+ settings: sub =>
{sub},
+ },
+ )}
+ );
+ }
+ }
+
render() {
const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog');
const AccessibleButton = sdk.getComponent("elements.AccessibleButton");
@@ -533,6 +689,7 @@ export default class DMInviteDialog extends React.PureComponent {
{this._renderEditor()}
+ {this._renderIdentityServerWarning()}