Skip to content

Commit f8bf5a3

Browse files
authored
feat: add IncomingWebxdcNotify.chat_id (#6356)
1 parent f61d5af commit f8bf5a3

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

deltachat-jsonrpc/src/api/types/events.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ pub enum EventType {
109109
/// Incoming webxdc info or summary update, should be notified.
110110
#[serde(rename_all = "camelCase")]
111111
IncomingWebxdcNotify {
112+
chat_id: u32,
112113
contact_id: u32,
113114
msg_id: u32,
114115
text: String,
@@ -343,11 +344,13 @@ impl From<CoreEventType> for EventType {
343344
reaction: reaction.as_str().to_string(),
344345
},
345346
CoreEventType::IncomingWebxdcNotify {
347+
chat_id,
346348
contact_id,
347349
msg_id,
348350
text,
349351
href,
350352
} => IncomingWebxdcNotify {
353+
chat_id: chat_id.to_u32(),
351354
contact_id: contact_id.to_u32(),
352355
msg_id: msg_id.to_u32(),
353356
text,

src/events/payload.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ pub enum EventType {
109109

110110
/// A webxdc wants an info message or a changed summary to be notified.
111111
IncomingWebxdcNotify {
112+
/// ID of the chat.
113+
chat_id: ChatId,
114+
112115
/// ID of the contact sending.
113116
contact_id: ContactId,
114117

src/webxdc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ impl Context {
421421
notify_list.get(&self_addr).or_else(|| notify_list.get("*"))
422422
{
423423
self.emit_event(EventType::IncomingWebxdcNotify {
424+
chat_id: instance.chat_id,
424425
contact_id: from_id,
425426
msg_id: notify_msg_id,
426427
text: notify_text.clone(),

0 commit comments

Comments
 (0)