From 799d00c230b11106b4d47f58dc22ea71e49274f9 Mon Sep 17 00:00:00 2001 From: Thilo Molitor Date: Sun, 8 Sep 2024 07:37:53 +0200 Subject: [PATCH] Better swift naming of some helpertools methods and nullability fixes --- Monal/Classes/HelperTools.h | 4 ++-- Monal/Classes/HelperTools.m | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Monal/Classes/HelperTools.h b/Monal/Classes/HelperTools.h index f48acaa3a..99967fa61 100644 --- a/Monal/Classes/HelperTools.h +++ b/Monal/Classes/HelperTools.h @@ -142,7 +142,7 @@ void swizzle(Class c, SEL orig, SEL new); +(NSString* _Nullable) exportIPCDatabase; +(void) configureFileProtection:(NSString*) protectionLevel forFile:(NSString*) file; +(void) configureFileProtectionFor:(NSString*) file; -+(BOOL) isContactBlacklistedForEncryption:(MLContact*) contact; ++(BOOL) isContactBlacklistedForEncryption:(MLContact*) contact NS_SWIFT_NAME(isContactBlacklistedForEncryption(_:)); +(void) removeAllShareInteractionsForAccountID:(NSNumber*) accountID; +(NSDictionary*) splitJid:(NSString*) jid; @@ -160,7 +160,7 @@ void swizzle(Class c, SEL orig, SEL new); +(NSString*) generateStringOfFeatureSet:(NSSet*) features; +(NSSet*) getOwnFeatureSet; +(NSString*) getEntityCapsHashForIdentities:(NSArray*) identities andFeatures:(NSSet*) features andForms:(NSArray*) forms; -+(NSString* _Nullable) formatLastInteraction:(NSDate*) lastInteraction; ++(NSString*) formatLastInteraction:(NSDate*) lastInteraction; +(NSString*) stringFromTimeInterval:(NSUInteger) interval; +(NSDate*) parseDateTimeString:(NSString*) datetime; +(NSString*) generateDateTimeString:(NSDate*) datetime; diff --git a/Monal/Classes/HelperTools.m b/Monal/Classes/HelperTools.m index 38c5ccaec..44bfd3ee4 100644 --- a/Monal/Classes/HelperTools.m +++ b/Monal/Classes/HelperTools.m @@ -1607,6 +1607,7 @@ +(void) configureFileProtectionFor:(NSString*) file +(BOOL) isContactBlacklistedForEncryption:(MLContact*) contact { BOOL blacklisted = NO; + //cheogram.com does not support OMEMO encryption as it is a PSTN gateway blacklisted = [@"cheogram.com" isEqualToString:[self splitJid:contact.contactJid][@"host"]]; if(blacklisted) DDLogWarn(@"Jid blacklisted for encryption: %@", contact); @@ -2248,9 +2249,8 @@ +(NSString*) generateStringOfCapsForms:(NSArray*) forms /* * create string containing the info when a user was seen the last time - * return nil if no timestamp was found in the db */ -+(NSString* _Nullable) formatLastInteraction:(NSDate*) lastInteraction ++(NSString*) formatLastInteraction:(NSDate*) lastInteraction { // get current timestamp unsigned long currentTimestamp = [HelperTools currentTimestampInSeconds].unsignedLongValue;