Skip to content

Commit 8675cb2

Browse files
danderson-contstefanceriu
authored andcommitted
feat(ffi): expose append parameter on Client::set_pusher
Forwards the new SDK append flag across the FFI boundary so multi-profile clients can register pushers without overwriting each other. Breaking change: Client::set_pusher now takes an append: bool parameter. Signed-off-by: Daniel Anderson <daniel.anderson@toptal.com>
1 parent d3c499d commit 8675cb2

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[**breaking**] `Client::set_pusher` now takes an `append: bool` parameter, forwarded to the homeserver. Pass `true` to keep an existing pusher with the same `app_id` and `pushkey` registered for other users (e.g. multi-profile clients on a single device); pass `false` to preserve the previous default behaviour.

bindings/matrix-sdk-ffi/src/client.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1477,6 +1477,7 @@ impl Client {
14771477
device_display_name: String,
14781478
profile_tag: Option<String>,
14791479
lang: String,
1480+
append: bool,
14801481
) -> Result<(), ClientError> {
14811482
let ids = identifiers.into();
14821483

@@ -1488,7 +1489,7 @@ impl Client {
14881489
profile_tag,
14891490
lang,
14901491
};
1491-
self.inner.pusher().set(pusher_init.into(), false).await?;
1492+
self.inner.pusher().set(pusher_init.into(), append).await?;
14921493
Ok(())
14931494
}
14941495

0 commit comments

Comments
 (0)