File tree Expand file tree Collapse file tree 3 files changed +4
-12
lines changed Expand file tree Collapse file tree 3 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -5337,8 +5337,7 @@ int dc_contact_is_blocked (const dc_contact_t* contact);
5337
5337
*
5338
5338
* @memberof dc_contact_t
5339
5339
* @param contact The contact object.
5340
- * @return 0: contact is not verified.
5341
- * 2: SELF and contact have verified their fingerprints in both directions.
5340
+ * @return 1=contact is verified, 0=contact is not verified.
5342
5341
*/
5343
5342
int dc_contact_is_verified (dc_contact_t * contact );
5344
5343
Original file line number Diff line number Diff line change @@ -4332,17 +4332,10 @@ pub unsafe extern "C" fn dc_contact_is_verified(contact: *mut dc_contact_t) -> l
4332
4332
let ffi_contact = & * contact;
4333
4333
let ctx = & * ffi_contact. context ;
4334
4334
4335
- if block_on ( ffi_contact. contact . is_verified ( ctx) )
4335
+ block_on ( ffi_contact. contact . is_verified ( ctx) )
4336
4336
. context ( "is_verified failed" )
4337
4337
. log_err ( ctx)
4338
- . unwrap_or_default ( )
4339
- {
4340
- // Return value is essentially a boolean,
4341
- // but we return 2 for true for backwards compatibility.
4342
- 2
4343
- } else {
4344
- 0
4345
- }
4338
+ . unwrap_or_default ( ) as libc:: c_int
4346
4339
}
4347
4340
4348
4341
#[ no_mangle]
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ def unblock(self):
73
73
74
74
def is_verified (self ) -> bool :
75
75
"""Return True if the contact is verified."""
76
- return lib .dc_contact_is_verified (self ._dc_contact ) == 2
76
+ return bool ( lib .dc_contact_is_verified (self ._dc_contact ))
77
77
78
78
def get_verifier (self , contact ) -> Optional ["Contact" ]:
79
79
"""Return the address of the contact that verified the contact."""
You can’t perform that action at this time.
0 commit comments