matrix-org / matrix-org/matrix-rust-sdk
Add API to the SDK to be able to delete pushers.
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 500
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 106
Description
The client application may want to change the configured pusher, and to do so the application need to be able to remove existing pusher before adding the new one. Existing API to add pusher is `setPusher`. Maybe something like `deletePusher(pushKey: String, appId: String)` would be nice.
Note that the network API is the same to unregister a pusher (this is not real CRUD), but the SDK needs to pass `null` to the `kind` parameter in order to remove the pusher. You can see the current Android SDK implementation here: https://github.com/vector-im/element-android/blob/develop/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/RemovePusherTask.kt#L55 if it helps.
Another API to be able to list the existing pushers would be nice too, but out of scope of this issue.
Contributor guide
Research direction
Start from the Rust SDK's existing `setPusher` API and compare its network request handling with the referenced Android `RemovePusherTask.kt`. Add the deletion API using the documented push key and app ID, passing a null kind to unregister the pusher, and verify the SDK behavior with its relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100