1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

add client method to remove pusher (#3324)

* add client method to remove pusher

* remove unused type
This commit is contained in:
Kerry
2023-04-28 09:49:35 +12:00
committed by GitHub
parent 2ebcda2a55
commit 71e763263e
2 changed files with 56 additions and 0 deletions

View File

@@ -8627,6 +8627,23 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
return this.http.authedRequest(Method.Post, path, undefined, pusher);
}
/**
* Removes an existing pusher
* @param pushKey - pushkey of pusher to remove
* @param appId - app_id of pusher to remove
* @returns Promise which resolves: Empty json object on success
* @returns Rejects: with an error response.
*/
public removePusher(pushKey: string, appId: string): Promise<{}> {
const path = "/pushers/set";
const body = {
pushkey: pushKey,
app_id: appId,
kind: null, // marks pusher for removal
};
return this.http.authedRequest(Method.Post, path, undefined, body);
}
/**
* Persists local notification settings
* @returns Promise which resolves: an empty object