Skip to content

Commit 1f77096

Browse files
6.4.19-b1 (#1582)
- Sort media gallery items from most recent to oldest - Allow users to ping the push appserver for debugging notification problems - Fixed omemo devicelist updates not published properly - Fixed audio playback not working after recording a voice message - Improved accessibility if users configure a dynamic font in settings (bigger text sizes)
2 parents b15a550 + bb6202b commit 1f77096

File tree

15 files changed

+227
-108
lines changed

15 files changed

+227
-108
lines changed

.github/workflows/quicksy.build-push.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ name: quicksy.build-push
44
# Controls when the action will run.
55
on:
66
# Triggers the workflow on push
7-
push:
8-
branches: [ stable ]
7+
#DISABLED UNTIL 7.0 RELEASE
8+
#push:
9+
# branches: [ stable ]
910

1011
workflow_dispatch:
1112

.github/workflows/stable.build-push.yml

Lines changed: 53 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,54 @@ jobs:
133133
if-no-files-found: error
134134
- name: validate ios app
135135
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)"
136+
- name: Notarize catalyst
137+
run: xcrun notarytool submit ./Monal/build/app/Monal.zip --wait --team-id S8D843U34Y --key "/Users/ci/appstoreconnect/apiKey.p8" --key-id "$(cat /Users/ci/appstoreconnect/apiKeyId.txt)" --issuer "$(cat /Users/ci/appstoreconnect/apiIssuerId.txt)"
138+
- name: Staple notarisation
139+
run: |
140+
cd Monal/build/app/tar_release/
141+
xcrun stapler staple "$APP_DIR"
142+
stapler validate "$APP_DIR"
143+
/usr/bin/ditto -c -k --sequesterRsrc --keepParent "$APP_DIR" "../$APP_NAME.zip"
144+
cd ../../../..
145+
- uses: actions/upload-artifact@v4
146+
with:
147+
name: monal-catalyst-zip
148+
path: Monal/build/app/Monal.zip
149+
if-no-files-found: error
150+
- uses: actions/upload-artifact@v4
151+
with:
152+
name: monal-catalyst-pkg
153+
path: Monal/build/app/Monal.pkg
154+
if-no-files-found: error
136155
- name: push tag to stable repo
137156
run: |
138157
buildNumber=$(git tag --sort="v:refname" |grep "Build_iOS" | grep -v "Quicksy_Build_iOS" | tail -n1 | sed 's/Build_iOS_//g')
139158
git push origin Build_iOS_$buildNumber
159+
- name: Create Draft Release
160+
id: draftrelease
161+
uses: softprops/action-gh-release@v2
162+
with:
163+
name: "${{ steps.releasenotes.outputs.name }}"
164+
tag_name: "${{ steps.releasenotes.outputs.tag }}"
165+
target_commitish: stable
166+
generate_release_notes: false
167+
body: "${{ steps.releasenotes.outputs.notes }}"
168+
files: |
169+
./Monal/build/ipa/Monal.ipa
170+
./Monal/build/ipa/monal-ios-dsym.zip
171+
./Monal/build/app/Monal.pkg
172+
./Monal/build/app/Monal.zip
173+
./Monal/build/app/monal-catalyst-dsym.zip
174+
fail_on_unmatched_files: true
175+
token: ${{ secrets.GITHUB_TOKEN }}
176+
prerelease: false
177+
draft: true
178+
- name: Write draft release id to build env
179+
env:
180+
RELEASE_ID: ${{ steps.draftrelease.outputs.id }}
181+
OUTPUT_FILE: ${{ steps.releasenotes.outputs.OUTPUT_FILE }}
182+
run: |
183+
echo "releaseID=${RELEASE_ID}" | tee /dev/stderr >> "${OUTPUT_FILE}"
140184
- name: Create fastlane metadata directory
141185
id: metadata
142186
env:
@@ -187,28 +231,10 @@ jobs:
187231
- name: Publish ios to appstore connect
188232
#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)"
189233
env:
234+
APP_VERSION: ${{ steps.releasenotes.outputs.version }}
190235
DELIVER_METADATA_PATH: ${{ steps.metadata.outputs.path_ios }}
191236
run: |
192-
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 }}" 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
193-
- name: Notarize catalyst
194-
run: xcrun notarytool submit ./Monal/build/app/Monal.zip --wait --team-id S8D843U34Y --key "/Users/ci/appstoreconnect/apiKey.p8" --key-id "$(cat /Users/ci/appstoreconnect/apiKeyId.txt)" --issuer "$(cat /Users/ci/appstoreconnect/apiIssuerId.txt)"
195-
- name: Staple notarisation
196-
run: |
197-
cd Monal/build/app/tar_release/
198-
xcrun stapler staple "$APP_DIR"
199-
stapler validate "$APP_DIR"
200-
/usr/bin/ditto -c -k --sequesterRsrc --keepParent "$APP_DIR" "../$APP_NAME.zip"
201-
cd ../../../..
202-
- uses: actions/upload-artifact@v4
203-
with:
204-
name: monal-catalyst-zip
205-
path: Monal/build/app/Monal.zip
206-
if-no-files-found: error
207-
- uses: actions/upload-artifact@v4
208-
with:
209-
name: monal-catalyst-pkg
210-
path: Monal/build/app/Monal.pkg
211-
if-no-files-found: error
237+
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:"${APP_VERSION}" 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
212238
- name: Upload new catalyst stable to monal-im.org
213239
env:
214240
UPLOAD_TYPE: stable
@@ -217,34 +243,16 @@ jobs:
217243
- name: Publish catalyst to appstore connect
218244
#run: xcrun altool --upload-app --file ./Monal/build/app/Monal.pkg --type macos --asc-provider S8D843U34Y -u "$(cat /Users/ci/apple_connect_upload_mail.txt)" -p "$(cat /Users/ci/apple_connect_upload_secret.txt)" --primary-bundle-id maccatalyst.G7YU7X7KRJ.SworIM
219245
env:
246+
APP_VERSION: ${{ steps.releasenotes.outputs.version }}
220247
DELIVER_METADATA_PATH: ${{ steps.metadata.outputs.path_macos }}
221248
run: |
222-
fastlane run upload_to_app_store api_key_path:"/Users/ci/appstoreconnect/key.json" team_id:"S8D843U34Y" pkg:"./Monal/build/app/Monal.pkg" app_version:"${{ steps.releasenotes.outputs.version }}" 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
249+
fastlane run upload_to_app_store api_key_path:"/Users/ci/appstoreconnect/key.json" team_id:"S8D843U34Y" pkg:"./Monal/build/app/Monal.pkg" app_version:"${APP_VERSION}" 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
223250
# - name: Update xmpp.org client list with new timestamp
224251
# run: ./scripts/push_xmpp.org.sh
225252
- name: Remove fastlane metadata directory
253+
env:
254+
METADATA_IOS: ${{ steps.metadata.outputs.path_ios }}
255+
METADATA_MACOS: ${{ steps.metadata.outputs.path_macos }}
226256
run: |
227-
rm -rf "${{ steps.metadata.outputs.path_ios }}"
228-
rm -rf "${{ steps.metadata.outputs.path_macos }}"
229-
- name: Create Draft Release
230-
id: draftrelease
231-
uses: softprops/action-gh-release@v2
232-
with:
233-
name: "${{ steps.releasenotes.outputs.name }}"
234-
tag_name: "${{ steps.releasenotes.outputs.tag }}"
235-
target_commitish: stable
236-
generate_release_notes: false
237-
body: "${{ steps.releasenotes.outputs.notes }}"
238-
files: |
239-
./Monal/build/ipa/Monal.ipa
240-
./Monal/build/ipa/monal-ios-dsym.zip
241-
./Monal/build/app/Monal.pkg
242-
./Monal/build/app/Monal.zip
243-
./Monal/build/app/monal-catalyst-dsym.zip
244-
fail_on_unmatched_files: true
245-
token: ${{ secrets.GITHUB_TOKEN }}
246-
prerelease: false
247-
draft: true
248-
- name: Write draft release id to build env
249-
run: |
250-
echo "releaseID=${{ steps.draftrelease.outputs.id }}" | tee /dev/stderr >> "${{ steps.releasenotes.outputs.OUTPUT_FILE }}"
257+
rm -rf "${METADATA_IOS}"
258+
rm -rf "${METADATA_MACOS}"

Monal/Classes/ContactEntry.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ struct ContactEntry<AdditionalContent: View>: View {
1010
let selfnotesPrefix: Bool
1111
let fallback: String?
1212
@ViewBuilder let additionalContent: () -> AdditionalContent
13+
@ScaledMetric(relativeTo:.body) private var size40px: CGFloat = 40
1314

1415
@StateObject var contact: ObservableKVOWrapper<MLContact>
1516

@@ -45,7 +46,7 @@ struct ContactEntry<AdditionalContent: View>: View {
4546
HStack(alignment: .center) {
4647
Image(uiImage: contact.avatar)
4748
.resizable()
48-
.frame(width: 40, height: 40, alignment: .center)
49+
.frame(width: size40px, height: size40px, alignment: .center)
4950
VStack(alignment: .leading) {
5051
if selfnotesPrefix {
5152
// use the if to make sure this view gets updated if the contact display name changes

Monal/Classes/DataLayer.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2342,7 +2342,7 @@ -(NSMutableArray*) allAttachmentsFromContact:(NSString*) contact forAccount:(NSS
23422342
return nil;
23432343

23442344
return [self.db idReadTransaction:^{
2345-
NSString* query = @"SELECT message_history_id FROM message_history WHERE messageType=? AND account_id=? AND buddy_name=? GROUP BY message ORDER BY message_history_id ASC;";
2345+
NSString* query = @"SELECT message_history_id FROM message_history WHERE messageType=? AND account_id=? AND buddy_name=? GROUP BY message ORDER BY message_history_id DESC;";
23462346
NSArray* params = @[kMessageTypeFiletransfer, accountNo, contact];
23472347

23482348
NSMutableArray* retval = [NSMutableArray new];

Monal/Classes/GeneralSettings.swift

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ class GeneralSettingsDefaultsDB: ObservableObject {
132132

133133
struct GeneralSettings: View {
134134
@ObservedObject var generalSettingsDefaultsDB = GeneralSettingsDefaultsDB()
135+
@ScaledMetric(relativeTo:.body) private var size20px: CGFloat = 20
135136

136137
var body: some View {
137138
Form {
@@ -141,7 +142,7 @@ struct GeneralSettings: View {
141142
Image(systemName: "hand.tap.fill")
142143
.resizable()
143144
.aspectRatio(contentMode: .fit)
144-
.frame(width: 20, height: 20)
145+
.frame(width: size20px, height: size20px)
145146
Text("User Interface")
146147
}
147148
}
@@ -150,7 +151,7 @@ struct GeneralSettings: View {
150151
Image(systemName: "shield.checkerboard")
151152
.resizable()
152153
.aspectRatio(contentMode: .fit)
153-
.frame(width: 20, height: 20)
154+
.frame(width: size20px, height: size20px)
154155
Text("Security")
155156
}
156157
}
@@ -159,7 +160,7 @@ struct GeneralSettings: View {
159160
Image(systemName: "eye")
160161
.resizable()
161162
.aspectRatio(contentMode: .fit)
162-
.frame(width: 20, height: 20)
163+
.frame(width: size20px, height: size20px)
163164
Text("Privacy")
164165
}
165166
}
@@ -168,7 +169,7 @@ struct GeneralSettings: View {
168169
Image(systemName: "text.bubble")
169170
.resizable()
170171
.aspectRatio(contentMode: .fit)
171-
.frame(width: 20, height: 20)
172+
.frame(width: size20px, height: size20px)
172173
Text("Notifications")
173174
}
174175
}
@@ -177,7 +178,7 @@ struct GeneralSettings: View {
177178
Image(systemName: "paperclip")
178179
.resizable()
179180
.aspectRatio(contentMode: .fit)
180-
.frame(width: 20, height: 20)
181+
.frame(width: size20px, height: size20px)
181182
Text("Attachments")
182183
}
183184
}
@@ -189,7 +190,7 @@ struct GeneralSettings: View {
189190
Image(systemName: "gear")
190191
.resizable()
191192
.aspectRatio(contentMode: .fit)
192-
.frame(width: 20, height: 20)
193+
.frame(width: size20px, height: size20px)
193194
#if targetEnvironment(macCatalyst)
194195
Text("Open macOS settings")
195196
#else

Monal/Classes/HelperTools.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ void swizzle(Class c, SEL orig, SEL new);
9292
+(void) postError:(NSString*) description withNode:(XMPPStanza* _Nullable) node andAccount:(xmpp*) account andIsSevere:(BOOL) isSevere andDisableAccount:(BOOL) disableAccount;
9393
+(void) postError:(NSString*) description withNode:(XMPPStanza* _Nullable) node andAccount:(xmpp*) account andIsSevere:(BOOL) isSevere;
9494
+(NSString*) extractXMPPError:(XMPPStanza*) stanza withDescription:(NSString* _Nullable) description;
95+
+(NSError*) getNSErrorFrom:(XMPPStanza*) stanza withDescription:(NSString*) description;
9596
+(void) showErrorOnAlpha:(NSString*) description withNode:(XMPPStanza* _Nullable) node andAccount:(xmpp* _Nullable) account andFile:(char*) file andLine:(int) line andFunc:(char*) func;
9697

9798
+(NSDictionary<NSString*, NSString*>*) getInvalidPushServers;

Monal/Classes/HelperTools.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,12 @@ +(NSString*) extractXMPPError:(XMPPStanza*) stanza withDescription:(NSString*) d
529529
return message;
530530
}
531531

532+
+(NSError*) getNSErrorFrom:(XMPPStanza*) stanza withDescription:(NSString*) description
533+
{
534+
NSString* errorMessage = [HelperTools extractXMPPError:stanza withDescription:description];
535+
return [NSError errorWithDomain:@"Monal" code:0 userInfo:@{NSLocalizedDescriptionKey: errorMessage}];
536+
}
537+
532538
+(void) initSystem
533539
{
534540
BOOL enableDefaultLogAndCrashFramework = YES;

Monal/Classes/MLCall.m

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -287,14 +287,12 @@ +(NSSet*) keyPathsForValuesAffectingState
287287

288288
-(xmpp*) account
289289
{
290-
@synchronized(self) {
291-
xmpp* account = [[MLXMPPManager sharedInstance] getConnectedAccountForID:self.contact.accountId];
292-
MLAssert(account != nil, @"Account of call must be listed in MLXMPPManager connected accounts!", (@{
293-
@"contact": nilWrapper(self.contact),
294-
@"call": nilWrapper(self),
295-
}));
296-
return account;
297-
}
290+
xmpp* account = [[MLXMPPManager sharedInstance] getConnectedAccountForID:self.contact.accountId];
291+
MLAssert(account != nil, @"Account of call must be listed in MLXMPPManager connected accounts!", (@{
292+
@"contact": nilWrapper(self.contact),
293+
@"call": nilWrapper(self),
294+
}));
295+
return account;
298296
}
299297
-(void) startCallDuartionTimer
300298
{
@@ -1320,16 +1318,44 @@ -(void) processIncomingICECandidate:(NSNotification*) notification
13201318
return;
13211319
}
13221320

1321+
//always fake candidate iqs to only contain one single candidate, even if multiple ones are listed (seems to be allowed as per XEP-0176)
1322+
NSMutableArray<XMPPIQ*>* candidates = [NSMutableArray new];
1323+
for(MLXMLNode* content in [iqNode find:@"{urn:xmpp:jingle:1}jingle/content"])
1324+
{
1325+
MLXMLNode* transport = [content findFirst:@"{urn:xmpp:jingle:transports:ice-udp:1}transport"];
1326+
for(MLXMLNode* candidate in [transport find:@"{urn:xmpp:jingle:transports:ice-udp:1}candidate"])
1327+
{
1328+
XMPPIQ* fakeCandidateIQ = [[XMPPIQ alloc] initWithType:kiqSetType];
1329+
fakeCandidateIQ.from = self.fullRemoteJid;
1330+
fakeCandidateIQ.to = self.account.connectionProperties.identity.fullJid;
1331+
MLXMLNode* shallowTransport = [transport shallowCopyWithData:YES];
1332+
[shallowTransport addChildNode:[transport removeChildNode:candidate]];
1333+
MLXMLNode* shallowContent = [content shallowCopyWithData:YES];
1334+
[shallowContent addChildNode:shallowTransport];
1335+
[fakeCandidateIQ addChildNode:[[MLXMLNode alloc] initWithElement:@"jingle" andNamespace:@"urn:xmpp:jingle:1" withAttributes:@{
1336+
@"action": @"transport-info",
1337+
@"sid": self.jmiid,
1338+
} andChildren:@[shallowContent] andData:nil]];
1339+
DDLogDebug(@"Adding faked incoming ICE candidate iq to candidates list: %@", fakeCandidateIQ);
1340+
[candidates addObject:fakeCandidateIQ];
1341+
}
1342+
}
1343+
13231344
@synchronized(self.candidateQueueLock) {
13241345
//queue candidate if sdp offer or answer have not been processed yet
13251346
if(self.remoteSDP == nil || self.localSDP == nil)
13261347
{
1327-
DDLogDebug(@"Adding incoming ICE candidate iq to candidate queue: %@", iqNode);
1328-
[self.incomingCandidateQueue addObject:iqNode];
1348+
for(XMPPIQ* candidateIq in candidates)
1349+
{
1350+
DDLogDebug(@"Adding incoming ICE candidate iq to candidate queue: %@", candidateIq);
1351+
[self.incomingCandidateQueue addObject:candidateIq];
1352+
}
13291353
return;
13301354
}
13311355
}
1332-
[self processRemoteICECandidate:iqNode];
1356+
1357+
for(XMPPIQ* candidateIq in candidates)
1358+
[self processRemoteICECandidate:candidateIq];
13331359
}
13341360

13351361
-(void) processRemoteICECandidate:(XMPPIQ*) iqNode
@@ -1603,7 +1629,7 @@ -(void) processIncomingSDP:(NSNotification*) notification
16031629
//handle session-terminate: fake jmi finish message and handle it
16041630
else if([iqNode check:@"{urn:xmpp:jingle:1}jingle<action=session-terminate>"])
16051631
{
1606-
if(self.jmiProceed == nil)
1632+
if(self.jmiProceed != nil)
16071633
{
16081634
DDLogDebug(@"Got jingle session-terminate after jmi proceed, faking incoming jmi:finish for Conversations compatibility...");
16091635
XMPPMessage* jmiNode = [[XMPPMessage alloc] initWithType:kMessageChatType to:self.account.connectionProperties.identity.jid];

Monal/Classes/MLOMEMO.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,7 @@ -(void) handleOwnDevicelistUpdate:(NSSet<NSNumber*>*) receivedDevices
562562

563563
-(void) cleanupOwnOldDevices
564564
{
565+
NSMutableArray* deletedDevices = [NSMutableArray new];
565566
NSString* jid = self.account.connectionProperties.identity.jid;
566567
for(NSNumber* device in [self.ownDeviceList copy])
567568
{
@@ -578,8 +579,14 @@ -(void) cleanupOwnOldDevices
578579
//remove own old devices (these clients will add thei id back, if they are still active)
579580
//this is what conversations does, too
580581
if(trust == MLOmemoToFUButNoMsgSeenInTime || trust == MLOmemoTrustedButNoMsgSeenInTime)
582+
{
581583
[self bulkDeleteDeviceForSource:jid andRid:device];
584+
[deletedDevices addObject:device];
585+
}
582586
}
587+
//publish our changes, but only if we actually changed someting
588+
if(deletedDevices.count > 0)
589+
[self publishOwnDeviceList];
583590
}
584591

585592
-(void) publishOwnDeviceList

0 commit comments

Comments
 (0)