mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-13 18:50:29 +03:00
Don't enable e2ee from profileViewer for bridge users (#666)
This commit is contained in:
parent
7decbb6eef
commit
47e6527b0e
3 changed files with 16 additions and 15 deletions
|
|
@ -6,7 +6,7 @@ import initMatrix from '../../../client/initMatrix';
|
|||
import cons from '../../../client/state/cons';
|
||||
import * as roomActions from '../../../client/action/room';
|
||||
import { selectRoom } from '../../../client/action/navigation';
|
||||
import { hasDMWith } from '../../../util/matrixUtil';
|
||||
import { hasDMWith, hasDevices } from '../../../util/matrixUtil';
|
||||
|
||||
import Text from '../../atoms/text/Text';
|
||||
import Button from '../../atoms/button/Button';
|
||||
|
|
@ -103,18 +103,6 @@ function InviteUser({
|
|||
updateIsSearching(false);
|
||||
}
|
||||
|
||||
async function hasDevices(userId) {
|
||||
try {
|
||||
const usersDeviceMap = await mx.downloadKeys([userId, mx.getUserId()]);
|
||||
return Object.values(usersDeviceMap).every((userDevices) =>
|
||||
Object.keys(userDevices).length > 0,
|
||||
);
|
||||
} catch (e) {
|
||||
console.error("Error determining if it's possible to encrypt to all users: ", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
async function createDM(userId) {
|
||||
if (mx.getUserId() === userId) return;
|
||||
const dmRoomId = hasDMWith(userId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue