You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-23 17:02:25 +03:00
Fix strict mode errors
This commit is contained in:
@@ -128,7 +128,7 @@ export interface IBootstrapCrossSigningOpts {
|
||||
}
|
||||
|
||||
export interface ICryptoCallbacks {
|
||||
getCrossSigningKey?: (keyType: string, pubKey: string) => Promise<Uint8Array>;
|
||||
getCrossSigningKey?: (keyType: string, pubKey: string) => Promise<Uint8Array | null>;
|
||||
saveCrossSigningKeys?: (keys: Record<string, Uint8Array>) => void;
|
||||
shouldUpgradeDeviceVerifications?: (
|
||||
users: Record<string, any>
|
||||
|
||||
@@ -396,7 +396,7 @@ export class SlidingSyncSdk {
|
||||
|
||||
public createRoom(roomId: string): Room { // XXX cargoculted from sync.ts
|
||||
const { timelineSupport } = this.client;
|
||||
const room = new Room(roomId, this.client, this.client.getUserId(), {
|
||||
const room = new Room(roomId, this.client, this.client.getUserId()!, {
|
||||
lazyLoadMembers: this.opts.lazyLoadMembers,
|
||||
pendingEventOrdering: this.opts.pendingEventOrdering,
|
||||
timelineSupport,
|
||||
@@ -428,7 +428,7 @@ export class SlidingSyncSdk {
|
||||
RoomStateEvent.Update,
|
||||
]);
|
||||
room.currentState.on(RoomStateEvent.NewMember, (event, state, member) => {
|
||||
member.user = this.client.getUser(member.userId);
|
||||
member.user = this.client.getUser(member.userId) ?? undefined;
|
||||
this.client.reEmitter.reEmit(member, [
|
||||
RoomMemberEvent.Name,
|
||||
RoomMemberEvent.Typing,
|
||||
|
||||
Reference in New Issue
Block a user