mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-24 18:59:17 +00:00
Fix room create tile not showing up with hidden events shown (#7810)
* Replace m.room.create with enum * Fix room create tile not showing up with hidden events shown
This commit is contained in:
committed by
GitHub
parent
b5e3ba28d9
commit
c2cf3a2d9e
+2
-1
@@ -18,6 +18,7 @@ limitations under the License.
|
||||
import { PushProcessor } from 'matrix-js-sdk/src/pushprocessor';
|
||||
import { NotificationCountType, Room } from "matrix-js-sdk/src/models/room";
|
||||
import { ConditionKind, IPushRule, PushRuleActionName, PushRuleKind } from "matrix-js-sdk/src/@types/PushRules";
|
||||
import { EventType } from 'matrix-js-sdk/src/@types/event';
|
||||
|
||||
import { MatrixClientPeg } from './MatrixClientPeg';
|
||||
|
||||
@@ -120,7 +121,7 @@ export function getUnreadNotificationCount(room: Room, type: NotificationCountTy
|
||||
// Check notification counts in the old room just in case there's some lost
|
||||
// there. We only go one level down to avoid performance issues, and theory
|
||||
// is that 1st generation rooms will have already been read by the 3rd generation.
|
||||
const createEvent = room.currentState.getStateEvents("m.room.create", "");
|
||||
const createEvent = room.currentState.getStateEvents(EventType.RoomCreate, "");
|
||||
if (createEvent && createEvent.getContent()['predecessor']) {
|
||||
const oldRoomId = createEvent.getContent()['predecessor']['room_id'];
|
||||
const oldRoom = MatrixClientPeg.get().getRoom(oldRoomId);
|
||||
|
||||
Reference in New Issue
Block a user