File tree 2 files changed +19
-1
lines changed
2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -1767,7 +1767,7 @@ impl CommandApi {
1767
1767
account_id : u32 ,
1768
1768
instance_msg_id : u32 ,
1769
1769
update_str : String ,
1770
- _descr : String ,
1770
+ _descr : Option < String > ,
1771
1771
) -> Result < ( ) > {
1772
1772
let ctx = self . get_context ( account_id) . await ?;
1773
1773
ctx. send_webxdc_status_update ( MsgId :: new ( instance_msg_id) , & update_str)
@@ -1829,6 +1829,18 @@ impl CommandApi {
1829
1829
WebxdcMessageInfo :: get_for_message ( & ctx, MsgId :: new ( instance_msg_id) ) . await
1830
1830
}
1831
1831
1832
+ /// Get href from a WebxdcInfoMessage which might include a hash holding
1833
+ /// information about a specific position or state in a webxdc app (optional)
1834
+ async fn get_webxdc_href (
1835
+ & self ,
1836
+ account_id : u32 ,
1837
+ instance_msg_id : u32 ,
1838
+ ) -> Result < Option < String > > {
1839
+ let ctx = self . get_context ( account_id) . await ?;
1840
+ let message = Message :: load_from_db ( & ctx, MsgId :: new ( instance_msg_id) ) . await ?;
1841
+ Ok ( message. get_webxdc_href ( ) )
1842
+ }
1843
+
1832
1844
/// Get blob encoded as base64 from a webxdc message
1833
1845
///
1834
1846
/// path is the path of the file within webxdc archive
Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ pub struct MessageObject {
85
85
86
86
webxdc_info : Option < WebxdcMessageInfo > ,
87
87
88
+ webxdc_href : Option < String > ,
89
+
88
90
download_state : DownloadState ,
89
91
90
92
reactions : Option < JSONRPCReactions > ,
@@ -241,6 +243,10 @@ impl MessageObject {
241
243
file_name : message. get_filename ( ) ,
242
244
webxdc_info,
243
245
246
+ // On a WebxdcInfoMessage this might include a hash holding
247
+ // information about a specific position or state in a webxdc app
248
+ webxdc_href : message. get_webxdc_href ( ) ,
249
+
244
250
download_state,
245
251
246
252
reactions,
You can’t perform that action at this time.
0 commit comments