matrix-rust-sdk icon indicating copy to clipboard operation
matrix-rust-sdk copied to clipboard

Notifications: allow resolving multiple notifications at once

Open ganfra opened this issue 8 months ago • 1 comments

Context : https://github.com/element-hq/element-x-android/issues/2910

The idea would be to expose a new api to resolve multiple notifications. Indeed, currently we are running a lot of sliding sync requests where we could probably run only one with all the rooms subscribed.

The api could looks like that :

pub enum NotificationResult {
    Resolved(NotificationItem),
    FilteredOut,
    Failed(Error),
}
 pub async fn get_notifications(
        &self,
        params: Vec<(RoomId, EventId)>,
    ) -> Vec<NotificationResult>

We need to make sure the EventId and RoomId are available in the NotificationItem so we can map them back in the client.

ganfra avatar May 28 '24 15:05 ganfra