Compare commits

...
4 Commits
Author SHA1 Message Date
Ajay Bura adf53caeff Fix crash in room without create state event 2022-05-12 13:19:34 +05:30
Ajay Bura 5863dcdf67 Fix join with alias (#533) 2022-05-11 20:56:49 +05:30
Ajay Bura f77bee25ef Remove forget room on leave 2022-05-11 20:53:21 +05:30
Ajay Bura c11328a064 Fix crash on leaving room (#532) 2022-05-11 20:25:54 +05:30
3 changed files with 2 additions and 3 deletions

No files matched your search

@@ -70,7 +70,7 @@ function RoomVisibility({ roomId }) {
const noSpaceParent = currentState.getStateEvents('m.space.parent').length === 0;
const mCreate = currentState.getStateEvents('m.room.create')[0]?.getContent();
const roomVersion = Number(mCreate.room_version);
const roomVersion = Number(mCreate?.room_version ?? 0);
const myPowerlevel = room.getMember(mx.getUserId())?.powerLevel || 0;
const canChange = room.currentState.hasSufficientPowerLevelFor('state_default', myPowerlevel);
+1 -1
View File
@@ -63,7 +63,7 @@ function JoinAliasContent({ term, requestClose }) {
if (alias.startsWith('#')) {
try {
const aliasData = await mx.resolveRoomAlias(alias);
via = aliasData?.servers || [];
via = aliasData?.servers.slice(0, 3) || [];
if (mountStore.getItem()) {
setProcess(`Joining ${alias}...`);
}
-1
View File
@@ -118,7 +118,6 @@ async function leave(roomId) {
const isDM = initMatrix.roomList.directs.has(roomId);
try {
await mx.leave(roomId);
await mx.forget(roomId);
appDispatcher.dispatch({
type: cons.actions.room.LEAVE,
roomId,