Skip to content

Commit

Permalink
6.4.3-rc1 (#1191)
Browse files Browse the repository at this point in the history
- Don't show spurious "new message" notifications for outgoing media
files
- Make sure to open the receiver's chat when sharing via sharesheet
- Fix hang on startup
- Fix SASL2 upgrade path for servers using LDAP as auth backend
  • Loading branch information
tmolitor-stud-tu authored Aug 3, 2024
2 parents 38c7c52 + bc51396 commit c266241
Show file tree
Hide file tree
Showing 19 changed files with 163 additions and 177 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/quicksy.build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ jobs:
env:
APP_NAME: "Quicksy"
BUILD_SCHEME: "Quicksy"
APP_DIR: "Monal.app"
BUILD_TYPE: "AppStore"
BUILD_TYPE: "AppStore-Quicksy"
EXPORT_OPTIONS_IOS: "../scripts/exportOptions/Quicksy_Stable_iOS_ExportOptions.plist"
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down Expand Up @@ -60,7 +59,9 @@ jobs:
}
buildNumber="$(git tag --sort="v:refname" | grep "Quicksy_Build_iOS" | tail -n1 | sed 's/Quicksy_Build_iOS_//g')"
version="$(git log -n 1 --merges --pretty=format:%s | sed -E 's/^[\t\n ]*([^\n\t ]+)[\t\n ]+\(([^\n\t ]+)\)[\t\n ]*$/\1/g')"
version="6.4.2"
if [ "${{ github.ref }}" != "refs/heads/stable" ]; then
version="1.$buildNumber"
fi
mkdir -p /Users/ci/releases
OUTPUT_FILE="/Users/ci/releases/$buildNumber.output"
touch "$OUTPUT_FILE"
Expand Down Expand Up @@ -103,15 +104,15 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: monal-ios
path: Monal/build/ipa/Monal.ipa
path: Monal/build/ipa/Quicksy.ipa
if-no-files-found: error
# - uses: actions/upload-artifact@v4
# with:
# name: monal-ios-dsym
# path: Monal/build/ios_Monal.xcarchive/dSYMs
# if-no-files-found: error
- name: validate ios app
run: xcrun altool --validate-app --file ./Monal/build/ipa/Monal.ipa --type ios -u $(cat /Users/ci/apple_connect_upload_mail.txt) -p "$(cat /Users/ci/apple_connect_upload_secret.txt)"
run: xcrun altool --validate-app --file ./Monal/build/ipa/Quicksy.ipa --type ios -u $(cat /Users/ci/apple_connect_upload_mail.txt) -p "$(cat /Users/ci/apple_connect_upload_secret.txt)"
- name: push tag to stable repo
run: |
buildNumber=$(git tag --sort="v:refname" | grep "Quicksy_Build_iOS" | tail -n1 | sed 's/Quicksy_Build_iOS_//g')
Expand All @@ -132,11 +133,11 @@ jobs:
done
echo "path_ios=$path_ios" | tee /dev/stderr >> "$GITHUB_OUTPUT"
- name: Publish ios to appstore connect
#run: xcrun altool --upload-app --file ./Monal/build/ipa/Monal.ipa --type ios --asc-provider S8D843U34Y --team-id S8D843U34Y -u $(cat /Users/ci/apple_connect_upload_mail.txt) -p "$(cat /Users/ci/apple_connect_upload_secret.txt)"
#run: xcrun altool --upload-app --file ./Monal/build/ipa/Quicksy.ipa --type ios --asc-provider S8D843U34Y --team-id S8D843U34Y -u $(cat /Users/ci/apple_connect_upload_mail.txt) -p "$(cat /Users/ci/apple_connect_upload_secret.txt)"
env:
DELIVER_METADATA_PATH: ${{ steps.metadata.outputs.path_ios }}
run: |
fastlane run upload_to_app_store api_key_path:"/Users/ci/appstoreconnect/key.json" team_id:"S8D843U34Y" ipa:"./Monal/build/ipa/Monal.ipa" app_version:"${{ steps.releasenotes.outputs.version }}" platform:ios reject_if_possible:true submit_for_review:true automatic_release:true skip_metadata:false skip_screenshots:true precheck_include_in_app_purchases:false version_check_wait_retry_limit:10 force:true
fastlane run upload_to_app_store api_key_path:"/Users/ci/appstoreconnect/key.json" team_id:"S8D843U34Y" ipa:"./Monal/build/ipa/Quicksy.ipa" app_version:"${{ steps.releasenotes.outputs.version }}" platform:ios reject_if_possible:true submit_for_review:true automatic_release:true skip_metadata:false skip_screenshots:true precheck_include_in_app_purchases:false version_check_wait_retry_limit:10 force:true
- name: Remove fastlane metadata directory
run: |
rm -rf "${{ steps.metadata.outputs.path }}"
2 changes: 2 additions & 0 deletions Monal/Classes/ActiveChatsViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ NS_ASSUME_NONNULL_BEGIN
-(void) showAddContact;
-(void) sheetDismissed;

-(void) dismissCompleteViewChainWithAnimation:(BOOL) animation andCompletion:(monal_void_block_t _Nullable) completion;

@end

NS_ASSUME_NONNULL_END
2 changes: 1 addition & 1 deletion Monal/Classes/ActiveChatsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ -(void) replaceIdOnViewQueue:(MLViewID) previousId withBlock:(view_queue_block_t
-(void) processViewQueue
{
//we are using uikit api all over the place: make sure we always run in the main queue
[HelperTools dispatchAsync:NO reentrantOnQueue:dispatch_get_main_queue() withBlock:^{
[HelperTools dispatchAsync:YES reentrantOnQueue:dispatch_get_main_queue() withBlock:^{
NSMutableArray* viewControllerHierarchy = [self getCurrentViewControllerHierarchy];

//don't show the next entry if there is still the previous one
Expand Down
3 changes: 0 additions & 3 deletions Monal/Classes/DataLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ extern NSString* const kAccountState;
extern NSString* const kDomain;
extern NSString* const kEnabled;
extern NSString* const kNeedsPasswordMigration;
extern NSString* const kSupportsSasl2;
extern NSString* const kPlainActivated;

extern NSString* const kServer;
Expand Down Expand Up @@ -165,8 +164,6 @@ extern NSString* const kMessageTypeFiletransfer;
-(BOOL) disableAccountForPasswordMigration:(NSNumber*) accountNo;
-(NSArray*) accountListNeedingPasswordMigration;

-(BOOL) pinSasl2ForAccount:(NSNumber*) accountNo;
-(BOOL) isSasl2PinnedForAccount:(NSNumber*) accountNo;
-(BOOL) isPlainActivatedForAccount:(NSNumber*) accountNo;
-(BOOL) deactivatePlainForAccount:(NSNumber*) accountNo;

Expand Down
22 changes: 1 addition & 21 deletions Monal/Classes/DataLayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ @implementation DataLayer
NSString *const kDomain = @"domain";
NSString *const kEnabled = @"enabled";
NSString *const kNeedsPasswordMigration = @"needs_password_migration";
NSString *const kSupportsSasl2 = @"supports_sasl2";
NSString *const kPlainActivated = @"plain_activated";

NSString *const kServer = @"server";
Expand Down Expand Up @@ -245,7 +244,7 @@ -(BOOL) updateAccounWithDictionary:(NSDictionary*) dictionary
{
return [self.db boolWriteTransaction:^{
DDLogVerbose(@"Updating account with: %@", dictionary);
NSString* query = @"UPDATE account SET server=?, other_port=?, username=?, resource=?, domain=?, enabled=?, directTLS=?, rosterName=?, statusMessage=?, needs_password_migration=?, supports_sasl2=? WHERE account_id=?;";
NSString* query = @"UPDATE account SET server=?, other_port=?, username=?, resource=?, domain=?, enabled=?, directTLS=?, rosterName=?, statusMessage=?, needs_password_migration=? WHERE account_id=?;";
NSString* server = (NSString*)[dictionary objectForKey:kServer];
NSString* port = (NSString*)[dictionary objectForKey:kPort];
NSArray* params = @[
Expand All @@ -259,7 +258,6 @@ -(BOOL) updateAccounWithDictionary:(NSDictionary*) dictionary
[dictionary objectForKey:kRosterName] ? ((NSString*)[dictionary objectForKey:kRosterName]) : @"",
[dictionary objectForKey:@"statusMessage"] ? ((NSString*)[dictionary objectForKey:@"statusMessage"]) : @"",
[dictionary objectForKey:kNeedsPasswordMigration],
[dictionary objectForKey:kSupportsSasl2],
[dictionary objectForKey:kAccountID],
];
BOOL retval = [self.db executeNonQuery:query andArguments:params];
Expand Down Expand Up @@ -335,24 +333,6 @@ -(NSArray*) accountListNeedingPasswordMigration
}];
}

-(BOOL) pinSasl2ForAccount:(NSNumber*) accountNo
{
return [self.db boolWriteTransaction:^{
return [self.db executeNonQuery:@"UPDATE account SET supports_sasl2=1 WHERE account_id=?;" andArguments:@[accountNo]];
}];
}

-(BOOL) isSasl2PinnedForAccount:(NSNumber*) accountNo
{
return [self.db boolReadTransaction:^{
NSNumber* sasl2Pinned = (NSNumber*)[self.db executeScalar:@"SELECT supports_sasl2 FROM account WHERE account_id=?;" andArguments:@[accountNo]];
if(sasl2Pinned == nil)
return NO;
else
return [sasl2Pinned boolValue];
}];
}

-(BOOL) isPlainActivatedForAccount:(NSNumber*) accountNo
{
return [self.db boolReadTransaction:^{
Expand Down
11 changes: 11 additions & 0 deletions Monal/Classes/DataLayerMigrations.m
Original file line number Diff line number Diff line change
Expand Up @@ -1080,6 +1080,17 @@ FOREIGN KEY('account_id') REFERENCES 'account'('account_id') ON DELETE CASCADE \
[db executeNonQuery:@"UPDATE buddylist SET muc_type=NULL;"];
}];

//reactivate PLAIN auth on all accounts to allow proper upgrades to servers only supporting PLAIN even with SASL2
//this should fix issue #1186
[self updateDB:db withDataLayer:dataLayer toVersion:6.405 withBlock:^{
[db executeNonQuery:@"UPDATE account SET plain_activated=true, supports_sasl2=false;"];
}];

//streamlined code with only plain_activated column
[self updateDB:db withDataLayer:dataLayer toVersion:6.406 withBlock:^{
[db executeNonQuery:@"ALTER TABLE account DROP COLUMN 'supports_sasl2';"];
}];


//check if device id changed and invalidate state, if so
//but do so only for non-sandbox (e.g. non-development) installs
Expand Down
2 changes: 1 addition & 1 deletion Monal/Classes/MLConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ typedef void (^contactCompletion)(MLContact* _Nonnull selectedContact) NS_SWIFT_
typedef void (^accountCompletion)(NSInteger accountRow) NS_SWIFT_UNAVAILABLE("To be redefined in swift.");
typedef void (^monal_void_block_t)(void) NS_SWIFT_UNAVAILABLE("To be redefined in swift.");
typedef void (^monal_id_block_t)(id _Nonnull) NS_SWIFT_UNAVAILABLE("To be redefined in swift.");
typedef id _Nullable (^monal_id_returning_block_t)(id _Nonnull) NS_SWIFT_UNAVAILABLE("To be redefined in swift.");
typedef id _Nullable (^monal_id_returning_void_block_t)(void) NS_SWIFT_UNAVAILABLE("To be redefined in swift.");
typedef id _Nullable (^monal_id_returning_id_block_t)(id _Nonnull) NS_SWIFT_UNAVAILABLE("To be redefined in swift.");
typedef void (^monal_upload_completion_t)(NSString* _Nullable url, NSString* _Nullable mimeType, NSNumber* _Nullable size, NSError* _Nullable error) NS_SWIFT_UNAVAILABLE("To be redefined in swift.");

Expand Down
2 changes: 1 addition & 1 deletion Monal/Classes/MLNotificationManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ -(void) handleFiletransferUpdate:(NSNotification*) notification
//do this asynchronous on a background thread
[self notificationStateForMessage:message].thenInBackground(^(NSNumber* _state) {
MLNotificationState state = _state.integerValue;
if(state == MLNotificationStatePending || state == MLNotificationStateNone)
if(state == MLNotificationStatePending)
{
DDLogDebug(@"Already pending or unknown notification '%@', updating/posting it...", idval);
[self internalMessageHandlerWithMessage:message andAccount:xmppAccount showAlert:YES andSound:YES andLMCReplaced:NO];
Expand Down
Loading

0 comments on commit c266241

Please sign in to comment.