Skip to content

Commit

Permalink
Correct empty object type
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy committed Dec 19, 2024
1 parent 49a43fc commit cf0ee8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4240,7 +4240,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
*/
public setAccountData<K extends keyof AccountDataEvents>(
eventType: K,
content: AccountDataEvents[K] | {},
content: AccountDataEvents[K] | Record<string, never>,
): Promise<{}> {
const path = utils.encodeUri("/user/$userId/account_data/$type", {
$userId: this.credentials.userId!,
Expand Down
5 changes: 4 additions & 1 deletion src/models/invites-ignorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,10 @@ export class IgnoredInvites {
const { policies, ignoreInvitesPolicies } = this.getPoliciesAndIgnoreInvitesPolicies();
cb(ignoreInvitesPolicies);
policies[IGNORE_INVITES_ACCOUNT_EVENT_KEY.name] = ignoreInvitesPolicies;
await this.client.setAccountData(POLICIES_ACCOUNT_EVENT_TYPE.name, policies);
await this.client.setAccountData(
POLICIES_ACCOUNT_EVENT_TYPE.name,
policies as IgnoreInvitesContent & UnstableIgnoreInvitesContent,
);
}

/**
Expand Down

0 comments on commit cf0ee8b

Please sign in to comment.