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 {
|
export interface ICryptoCallbacks {
|
||||||
getCrossSigningKey?: (keyType: string, pubKey: string) => Promise<Uint8Array>;
|
getCrossSigningKey?: (keyType: string, pubKey: string) => Promise<Uint8Array | null>;
|
||||||
saveCrossSigningKeys?: (keys: Record<string, Uint8Array>) => void;
|
saveCrossSigningKeys?: (keys: Record<string, Uint8Array>) => void;
|
||||||
shouldUpgradeDeviceVerifications?: (
|
shouldUpgradeDeviceVerifications?: (
|
||||||
users: Record<string, any>
|
users: Record<string, any>
|
||||||
|
|||||||
@@ -396,7 +396,7 @@ export class SlidingSyncSdk {
|
|||||||
|
|
||||||
public createRoom(roomId: string): Room { // XXX cargoculted from sync.ts
|
public createRoom(roomId: string): Room { // XXX cargoculted from sync.ts
|
||||||
const { timelineSupport } = this.client;
|
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,
|
lazyLoadMembers: this.opts.lazyLoadMembers,
|
||||||
pendingEventOrdering: this.opts.pendingEventOrdering,
|
pendingEventOrdering: this.opts.pendingEventOrdering,
|
||||||
timelineSupport,
|
timelineSupport,
|
||||||
@@ -428,7 +428,7 @@ export class SlidingSyncSdk {
|
|||||||
RoomStateEvent.Update,
|
RoomStateEvent.Update,
|
||||||
]);
|
]);
|
||||||
room.currentState.on(RoomStateEvent.NewMember, (event, state, member) => {
|
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, [
|
this.client.reEmitter.reEmit(member, [
|
||||||
RoomMemberEvent.Name,
|
RoomMemberEvent.Name,
|
||||||
RoomMemberEvent.Typing,
|
RoomMemberEvent.Typing,
|
||||||
|
|||||||
Reference in New Issue
Block a user