Skip to content

Commit 21010f4

Browse files
committed
add jsonrpc for info_contact_id
1 parent b03edab commit 21010f4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ pub struct MessageObject {
7070
/// when is_info is true this describes what type of system message it is
7171
system_message_type: SystemMessageType,
7272

73+
/// if is_info is set, this refers to the contact profile that should be opened when the info message is tapped.
74+
info_contact_id: Option<u32>,
75+
7376
duration: i32,
7477
dimensions_height: i32,
7578
dimensions_width: i32,
@@ -228,6 +231,10 @@ impl MessageObject {
228231
is_forwarded: message.is_forwarded(),
229232
is_bot: message.is_bot(),
230233
system_message_type: message.get_info_type().into(),
234+
info_contact_id: message
235+
.get_info_contact_id(context)
236+
.await?
237+
.map(|id| id.to_u32()),
231238

232239
duration: message.get_duration(),
233240
dimensions_height: message.get_height(),

0 commit comments

Comments
 (0)