@@ -120,6 +120,23 @@ struct SecurejoinUIPaths {
120
120
new_contact : u32 ,
121
121
}
122
122
123
+ /// Some information on an invite-joining event
124
+ /// (i.e. a qr scan or a clicked link).
125
+ #[ derive( Serialize ) ]
126
+ struct JoinedInvite {
127
+ /// Whether the contact was newly created right now.
128
+ /// If this is false, then a contact existed already before.
129
+ contact_created : bool ,
130
+ /// If a contact already existed,
131
+ /// this tells us whether the contact was verified already.
132
+ already_verified : bool ,
133
+ /// The type of the invite:
134
+ /// "contact" for 1:1 invites that setup a verified contact,
135
+ /// "group" for invites that invite to a group
136
+ /// and also perform the contact verification 'along the way'.
137
+ typ : String ,
138
+ }
139
+
123
140
/// Sends a message with statistics about the usage of Delta Chat,
124
141
/// if the last time such a message was sent
125
142
/// was more than a week ago.
@@ -513,8 +530,7 @@ async fn get_message_stats(
513
530
514
531
let unverified_encrypted = t. query_row (
515
532
& format ! (
516
- // (param GLOB '*\nc=1*' OR param GLOB 'c=1*')`
517
- // matches all messages that are end-to-end encrypted
533
+ // (param GLOB '*\nc=1*' OR param GLOB 'c=1*') matches all messages that are end-to-end encrypted
518
534
"SELECT COUNT(*) FROM msgs
519
535
WHERE chat_id NOT IN temp.verified_chats AND chat_id NOT IN temp.empty_chats
520
536
AND (param GLOB '*\n c=1*' OR param GLOB 'c=1*')
@@ -686,23 +702,6 @@ pub(crate) async fn count_securejoin_invite(context: &Context, invite: &QrInvite
686
702
Ok ( ( ) )
687
703
}
688
704
689
- /// Some information on an invite-joining event
690
- /// (i.e. a qr scan or a clicked link).
691
- #[ derive( Serialize ) ]
692
- struct JoinedInvite {
693
- /// Whether the contact was newly created right now.
694
- /// If this is false, then a contact existed already before.
695
- contact_created : bool ,
696
- /// If a contact already existed,
697
- /// this tells us whether the contact was verified already.
698
- already_verified : bool ,
699
- /// The type of the invite:
700
- /// "contact" for 1:1 invites that setup a verified contact,
701
- /// "group" for invites that invite to a group
702
- /// and also perform the contact verification 'along the way'.
703
- typ : String ,
704
- }
705
-
706
705
async fn get_securejoin_invite_stats ( context : & Context ) -> Result < Vec < JoinedInvite > > {
707
706
let qr_scans: Vec < JoinedInvite > = context
708
707
. sql
0 commit comments