client-api: Change AnyEvent to AnySyncRoomEvent in push::get_notifications::Notification

This commit is contained in:
Kévin Commaille 2021-04-04 18:51:24 +02:00 committed by GitHub
parent 86e3268079
commit f67f44c8aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -65,6 +65,8 @@ Breaking changes:
* Move `user: UserInfo` in `r0::session::login::Request` to `identifier: UserIdentifier` in
`r0::session::login::LoginInfo::Password`
* `r0::session::login::Request::new` takes only `login_info: LoginInfo` as a param
* Change `ruma_events::AnyEvent` to `ruma_events::AnySyncRoomEvent` in
`push::get_notifications::Notification`
Improvements:

View File

@ -5,7 +5,7 @@ use std::time::SystemTime;
use js_int::UInt;
use ruma_api::ruma_api;
use ruma_common::push::Action;
use ruma_events::AnyEvent;
use ruma_events::AnySyncRoomEvent;
use ruma_identifiers::RoomId;
use ruma_serde::Raw;
use serde::{Deserialize, Serialize};
@ -75,7 +75,7 @@ pub struct Notification {
pub actions: Vec<Action>,
/// The event that triggered the notification.
pub event: Raw<AnyEvent>,
pub event: Raw<AnySyncRoomEvent>,
/// The profile tag of the rule that matched this event.
#[serde(skip_serializing_if = "Option::is_none")]
@ -98,7 +98,7 @@ impl Notification {
/// timestamp.
pub fn new(
actions: Vec<Action>,
event: Raw<AnyEvent>,
event: Raw<AnySyncRoomEvent>,
read: bool,
room_id: RoomId,
ts: SystemTime,