mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 23:06:32 +03:00
feat: add IncomingWebxdcNotify.chat_id (#6356)
This commit is contained in:
@@ -109,6 +109,7 @@ pub enum EventType {
|
|||||||
/// Incoming webxdc info or summary update, should be notified.
|
/// Incoming webxdc info or summary update, should be notified.
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
IncomingWebxdcNotify {
|
IncomingWebxdcNotify {
|
||||||
|
chat_id: u32,
|
||||||
contact_id: u32,
|
contact_id: u32,
|
||||||
msg_id: u32,
|
msg_id: u32,
|
||||||
text: String,
|
text: String,
|
||||||
@@ -343,11 +344,13 @@ impl From<CoreEventType> for EventType {
|
|||||||
reaction: reaction.as_str().to_string(),
|
reaction: reaction.as_str().to_string(),
|
||||||
},
|
},
|
||||||
CoreEventType::IncomingWebxdcNotify {
|
CoreEventType::IncomingWebxdcNotify {
|
||||||
|
chat_id,
|
||||||
contact_id,
|
contact_id,
|
||||||
msg_id,
|
msg_id,
|
||||||
text,
|
text,
|
||||||
href,
|
href,
|
||||||
} => IncomingWebxdcNotify {
|
} => IncomingWebxdcNotify {
|
||||||
|
chat_id: chat_id.to_u32(),
|
||||||
contact_id: contact_id.to_u32(),
|
contact_id: contact_id.to_u32(),
|
||||||
msg_id: msg_id.to_u32(),
|
msg_id: msg_id.to_u32(),
|
||||||
text,
|
text,
|
||||||
|
|||||||
@@ -109,6 +109,9 @@ pub enum EventType {
|
|||||||
|
|
||||||
/// A webxdc wants an info message or a changed summary to be notified.
|
/// A webxdc wants an info message or a changed summary to be notified.
|
||||||
IncomingWebxdcNotify {
|
IncomingWebxdcNotify {
|
||||||
|
/// ID of the chat.
|
||||||
|
chat_id: ChatId,
|
||||||
|
|
||||||
/// ID of the contact sending.
|
/// ID of the contact sending.
|
||||||
contact_id: ContactId,
|
contact_id: ContactId,
|
||||||
|
|
||||||
|
|||||||
@@ -421,6 +421,7 @@ impl Context {
|
|||||||
notify_list.get(&self_addr).or_else(|| notify_list.get("*"))
|
notify_list.get(&self_addr).or_else(|| notify_list.get("*"))
|
||||||
{
|
{
|
||||||
self.emit_event(EventType::IncomingWebxdcNotify {
|
self.emit_event(EventType::IncomingWebxdcNotify {
|
||||||
|
chat_id: instance.chat_id,
|
||||||
contact_id: from_id,
|
contact_id: from_id,
|
||||||
msg_id: notify_msg_id,
|
msg_id: notify_msg_id,
|
||||||
text: notify_text.clone(),
|
text: notify_text.clone(),
|
||||||
|
|||||||
Reference in New Issue
Block a user