mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Merge pull request #3530 from vector-im/dbkr/email_notifs_only_to_email_addresses
Don't show phone number as target for email notifs
This commit is contained in:
commit
2480831e2f
@ -719,20 +719,17 @@ module.exports = React.createClass({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
var emailNotificationsRow;
|
const emailThreepids = this.props.threepids.filter((tp) => tp.medium === "email");
|
||||||
if (this.props.threepids.filter(function(tp) {
|
let emailNotificationsRow;
|
||||||
if (tp.medium == "email") {
|
if (emailThreepids.length === 0) {
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}).length == 0) {
|
|
||||||
emailNotificationsRow = <div>
|
emailNotificationsRow = <div>
|
||||||
Add an email address above to configure email notifications
|
Add an email address above to configure email notifications
|
||||||
</div>;
|
</div>;
|
||||||
} else {
|
} else {
|
||||||
// This only supports the first email address in your profile for now
|
// This only supports the first email address in your profile for now
|
||||||
emailNotificationsRow = this.emailNotificationsRow(
|
emailNotificationsRow = this.emailNotificationsRow(
|
||||||
this.props.threepids[0].address,
|
emailThreepids[0].address,
|
||||||
"Enable email notifications ("+this.props.threepids[0].address+")"
|
"Enable email notifications ("+emailThreepids[0].address+")"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user