Add MemberInfo for 3pid invites and support revoking those invites

Fixes https://github.com/vector-im/riot-web/issues/625
Fixes https://github.com/vector-im/riot-web/issues/6411
Fixes https://github.com/vector-im/riot-web/issues/5490
This commit is contained in:
Travis Ralston 2019-03-28 20:38:15 -06:00
parent 45e4948d9a
commit 5beec37c43
6 changed files with 176 additions and 0 deletions

View file

@ -366,6 +366,15 @@ function textForCallInviteEvent(event) {
function textForThreePidInviteEvent(event) {
const senderName = event.sender ? event.sender.name : event.getSender();
if (!event.getContent().display_name) {
const targetDisplayName = event.getPrevContent().display_name || _t("Someone");
return _t('%(senderName)s revoked the invitation for %(targetDisplayName)s to join the room.', {
senderName,
targetDisplayName,
});
}
return _t('%(senderName)s sent an invitation to %(targetDisplayName)s to join the room.', {
senderName,
targetDisplayName: event.getContent().display_name,