Remove 'unverify' from UserInfoPanel

It's not in the designs and it's not a thing we can do with
cross-signing (at least not at the moment).
pull/21833/head
David Baker 2020-01-03 15:00:51 +00:00
parent 23dffb69ac
commit 5897c8ca7f
1 changed files with 0 additions and 20 deletions

View File

@ -74,17 +74,6 @@ const _getE2EStatus = (cli, userId, devices) => {
return "warning"; return "warning";
}; };
async function unverifyUser(matrixClient, userId) {
const devices = await matrixClient.getStoredDevicesForUser(userId);
for (const device of devices) {
if (device.isVerified()) {
matrixClient.setDeviceVerified(
userId, device.deviceId, false,
);
}
}
}
function openDMForUser(matrixClient, userId) { function openDMForUser(matrixClient, userId) {
const dmRooms = DMRoomMap.shared().getDMRoomsForUserId(userId); const dmRooms = DMRoomMap.shared().getDMRoomsForUserId(userId);
const lastActiveRoom = dmRooms.reduce((lastActiveRoom, roomId) => { const lastActiveRoom = dmRooms.reduce((lastActiveRoom, roomId) => {
@ -331,14 +320,6 @@ const UserOptionsSection = ({member, isIgnored, canInvite, devices}) => {
</AccessibleButton> </AccessibleButton>
); );
} }
let unverifyButton;
if (devices && devices.some(device => device.isVerified())) {
unverifyButton = (
<AccessibleButton onClick={() => unverifyUser(cli, member.userId)} className="mx_UserInfo_field mx_UserInfo_destructive">
{ _t('Unverify user') }
</AccessibleButton>
);
}
return ( return (
<div className="mx_UserInfo_container"> <div className="mx_UserInfo_container">
@ -350,7 +331,6 @@ const UserOptionsSection = ({member, isIgnored, canInvite, devices}) => {
{ insertPillButton } { insertPillButton }
{ inviteUserButton } { inviteUserButton }
{ ignoreButton } { ignoreButton }
{ unverifyButton }
</div> </div>
</div> </div>
); );