feat: add IncomingReaction.chat_id (#6459)

For the same reasons as mentioned in #6356 and to streamline the
"Incoming" Event API. (all have a chat_id)
This commit is contained in:
Nico de Haen
2025-01-29 10:05:20 +01:00
committed by GitHub
parent 963576752b
commit fcdbe3ff4a
3 changed files with 26 additions and 3 deletions

View File

@@ -101,6 +101,7 @@ pub enum EventType {
/// Incoming reaction, should be notified.
#[serde(rename_all = "camelCase")]
IncomingReaction {
chat_id: u32,
contact_id: u32,
msg_id: u32,
reaction: String,
@@ -335,10 +336,12 @@ impl From<CoreEventType> for EventType {
contact_id: contact_id.to_u32(),
},
CoreEventType::IncomingReaction {
chat_id,
contact_id,
msg_id,
reaction,
} => IncomingReaction {
chat_id: chat_id.to_u32(),
contact_id: contact_id.to_u32(),
msg_id: msg_id.to_u32(),
reaction: reaction.as_str().to_string(),