From 21010f4de6e5190b5f34cd04e385485b5df23eea Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 2 Apr 2025 17:23:27 +0200 Subject: [PATCH] add jsonrpc for info_contact_id --- deltachat-jsonrpc/src/api/types/message.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deltachat-jsonrpc/src/api/types/message.rs b/deltachat-jsonrpc/src/api/types/message.rs index 6e8cd1c73..a5c25184a 100644 --- a/deltachat-jsonrpc/src/api/types/message.rs +++ b/deltachat-jsonrpc/src/api/types/message.rs @@ -70,6 +70,9 @@ pub struct MessageObject { /// when is_info is true this describes what type of system message it is system_message_type: SystemMessageType, + /// if is_info is set, this refers to the contact profile that should be opened when the info message is tapped. + info_contact_id: Option, + duration: i32, dimensions_height: i32, dimensions_width: i32, @@ -228,6 +231,10 @@ impl MessageObject { is_forwarded: message.is_forwarded(), is_bot: message.is_bot(), system_message_type: message.get_info_type().into(), + info_contact_id: message + .get_info_contact_id(context) + .await? + .map(|id| id.to_u32()), duration: message.get_duration(), dimensions_height: message.get_height(),