Commit Graph

1972 Commits (d30112ec604413b6f32faf325551d9a1f16dd156)

Author SHA1 Message Date
Morgan Pretty 417976995b Removed YYImage and libWebP, fixed a couple of bugs
• Removed YYImage and libWebP dependencies (replaced with custom `AnimatedImageView` class)
• Fixed an issue where animated images (WebP/GIF) may not correctly render in the "All Media" grid UI
• Fixed an issue where selecting a GIF for the display picture would incorrectly convert it into a JPG instead of keeping the GIF
2 weeks ago
Morgan Pretty 95f4150c96 Use a guard to prevent an implicit unwrap 2 weeks ago
Morgan Pretty 82b315ccb1
Merge pull request #383 from mpretty-cyro/fix/poller-and-background-processing-bugs
Poller and background processing fixes
3 weeks ago
Morgan Pretty 6017a992ce Merge remote-tracking branch 'upstream/dev' into fix/poller-and-background-processing-bugs 3 weeks ago
Morgan Pretty bb6e78dc27 Merge remote-tracking branch 'upstream/dev' into fix/logging-issues-and-improvements
# Conflicts:
#	Session/Home/GlobalSearch/GlobalSearchViewController.swift
3 weeks ago
Morgan Pretty fdcdd070a1 Merge remote-tracking branch 'upstream/dev' into fix/logging-issues-and-improvements
# Conflicts:
#	SessionMessagingKit/LibSession/LibSession+SessionMessagingKit.swift
#	SessionMessagingKitTests/_TestUtilities/MockLibSessionCache.swift
3 weeks ago
Morgan Pretty b12a5282bb
Merge pull request #392 from mpretty-cyro/fix/grdb-assertion
Fix GRDB Assertion
3 weeks ago
Morgan Pretty 05d47392db
Merge pull request #393 from mpretty-cyro/fix/partial-group-state-loading
Fixed an issue where groups with only some config dumps wouldn't load
3 weeks ago
Morgan Pretty 88a242b39f
Merge pull request #380 from mpretty-cyro/fix/read-status-not-appearing
Fixed an issue where the read receipt wouldn't show while the conversation was open
3 weeks ago
Morgan Pretty 975fc52b5d Removed a left over TODO 3 weeks ago
Morgan Pretty 82b9c18929 Fixed an issue where groups with only some config dumps wouldn't load
• Cleaned up the interface for loading the "default" state for configs (shouldn't really be used outside of onboarding to tweaked it's interface)
• Updated the logic so group configs would be initialised all at once per group (previously it would load them in variant load order, now it will be group -> variant load order)
• Fixed an issue where groups in the invited state would incorrectly load their config states
3 weeks ago
Morgan Pretty e11375fdeb Fixed the broken unit tests 3 weeks ago
Morgan Pretty e29758e401 Updated GRDB and refactored internal Storage operations
• Updated to GRDB 7.3.0 (from 6.29.3)
• Updated the ConfigMessageReceiveJob and MessageReceiveJob to use the `writeAsync` function (instead of the blocking `write` function) so that they aren't subject to the `Storage.transactionDeadlockTimeoutSeconds`
• Refactored the `Storage.performOperation` and `Storage.performPublisherOperation` to rely on the new cancellable async/await `Task` logic that GRDB 7 supports (as apparently the other async methods don't support cancellation...)
• Cleaned up some "Sendable" related warnings
• Minor tweaks to `Log.assertOnMainThread` to make it a little more readable
3 weeks ago
Morgan Pretty cd919284f0 Updated the invalid config errors to include the pubkey for debugging 1 month ago
Morgan Pretty a080d67618 Fixed a couple of bugs and logging tweaks
• Refactored the remaining `SNLog` calls
• Added support for a 'customSuffix' to the log categories (similar to the 'customPrefix' it allows category name manipulation whilst keeping the existing log level settings)
• Improved logging in the PN extension
• Fixed an issue where the PN extension would end up with duplicate logs every time a new PN was received
• Fixed an issue where the PN extension would needlessly dispatch it's setup to the main thread
• Fixed an issue where the PN extension would try to read from the database after suspending it
• Fixed an issue where the PN extension could try to complete on a non-main thread (eg. db threads) which _might_ cause odd behaviours
1 month ago
Morgan Pretty 4435240d2b Fixed a number of background processing and polling issues
• Tweaked some background poller logs
• Refactored the `BackgroundFetch` handling to use a `DispatchSourceTimer` instead of `NSTimer` and use a specific `DispatchQueue` to avoid race conditions
• Refactored the BackgroundTaskManager to use `DispatchQueue` and `DispatchSourceTimer` and removed unused code (was seeing background tasks incorrectly running too long so wanted to clean it up)
• Fixed an issue where pollers would incorrectly be released during background polling
• Fixed an issue where the background poller wouldn't update the app notification badge count
• Fixed an issue where the community pollers 'timeSinceLastPoll' was incorrectly being given both an epoch timestamp as well as a duration since the last poll (resulting in always just refetching recent messages)
• Fixed an issue where the community poller wasn't updating the last poll timestamp (also renamed some functions to make them clearer)
• Fixed an issue where pollers could incorrectly be started in the background (eg. when receiving a PN)
1 month ago
Morgan Pretty f67c754088 Fixed an issue where the read receipt wouldn't show 1 month ago
Morgan Pretty 4b5eb7755c Sort group member change control messages deterministically 1 month ago
Morgan Pretty a049d87b11 Fixed a few bugs which came up during testing
• Added a 'requireAllRequestsSucceed' flag to the ConfigurationSyncJob (so it'll report a failure if any individual request fails)
• Fixed an issue where a number of 'response' types weren't encoding correctly (only impacted unit tests)
• Fixed an issue where the logger wasn't correctly respecting the log level settings
• Fixed an issue where the path status indicator wouldn't default to unknown
• Fixed an issue where the generic database error didn't replace the 'app_name' variable
• Fixed an issue where notification content might not be shown correctly
• Fixed an issue where a group could be partially created due to one of it's configs failing to be stored (we now consider that a failure so the user can try again)
• Fixed an issue where processing a config message in the BackgroundPoller could result in attempting to fetch from communities after the process completed
• Fixed a crash where a database query could incorrectly be interrupted after it completed if both happened at just the right time
• Fixed broken unit tests
1 month ago
Morgan Pretty 22f3974968 Fixed a couple of issues found during internal testing
• Fixed an issue where leaving a group from the settings screen would just sit there until you successfully left
• Fixed an issue where admin display pictures didn't have the crown icon in the conversation screen
1 month ago
Morgan Pretty 828b25254a Fixed a silly message variant bug, unit test env var tweaks
• Added an env variable to enable the debug disappearing message durations
• Moved the 'processUnitTestEnvVariablesIfNeeded' function into a separate file and added some docs (so we can just look at that file to see what is supported)
• Fixed an issue where the deleted message artifact variant had incorrectly gotten it's value changed (too late to change it back so need a migration)
1 month ago
Morgan Pretty 4399a5a5bb Fixed a few issues that came up when testing
• Attempt to fix an issue where the CI couldn't find a test simulator because it didn't exist (now try to grab the latest)
• Refactored the notification service extension logging to be more helpful and allow for better tracking
• Fixed a minor layout issue on devices with a home button
• Fixed an issue where display pictures could be given the wrong file extension because we were assuming jpeg
• Fixed an issue where disabling the "Auto dark-mode" setting may not correctly trigger a theme update
• Fixed an issue where returning to the settings screen from a child screen would result in the screen jumping
• Fixed an issue where migrating the community display picture would fail
• Fixed an issue where failing to decrypt a config message push notification would incorrectly result in the fallback notification being shown
1 month ago
Morgan Pretty ad821dcbf1 Fixed some string issues
• Updated the string linter logic to error when incorrect parameter names are given (or missed)
• Updated the code based on the latest string changes
• Fixed an issue where the string linter wasn't working
2 months ago
Morgan Pretty d91af1b5b6 Fixed a few bugs
• Updated to the latest libSession
• Fixed some warnings
• Fixed a compilation issue on non-debug builds
• Fixed an issue with the dev settings data importer when ignoring hidden files from old exports (wouldn't move the inputStream forward correctly resulting in a crash)
• Fixed an issue where the swarm poller wasn't included synchronously processed messages in it's publisher output
2 months ago
Morgan Pretty d22c2cccf1 Fixed a few migration issues found when testing 2 months ago
Morgan Pretty bdbfe6c28e Refactored the remaining DB queries to avoid using type-based queries 2 months ago
Morgan Pretty 647919efde Started working on refactoring the migrations to avoid an anti-pattern 2 months ago
Morgan Pretty 1f3f7ba7c6 Fixed QA issues
• Refactored the 'performOperation' function to have cleaner control flow and resolve another EXC_BAD_ACCESS edge case
• Updated the code to allow legacy groups to be unpinned after they are deprecated
• Fixed an issue where the default state of the global search screen wouldn't be populated if you had a contact with no SessionThread record
• Fixed an issue with display picture placeholder generation
• Fixed an issue where the edit group screen would show the group display picture back to front
2 months ago
Morgan Pretty 823409709c Added timestamp verification logic and fixed a couple of QA issues
• Updated the code to set and check the 'sigTimestamp' value in order to validate the envelope.timestamp when possible
• Disabled the delete/select buttons on the attachment screens in legacy groups once deprecated
• Disabled the ability to remove reactions from the reaction list in legacy groups once deprecated
• Fixed an issue where the "expired groups" banner could incorrectly appear after creating a new group
• Fixed an issue where the ConfigSyncJob wouldn't report it's failure immediately
2 months ago
Morgan Pretty 35972d176a Fixed broken message sending for TestFlight build
• Fixed broken unit tests
• Fixed some incorrect logic for validating a message
2 months ago
Morgan Pretty c99ee90ca6 Fixed a QA issue, a couple edge-cases and cleaned up some logic
• Added the "expired group" banner for when the first poll of an updated group doesn't retrieve config messages
• Removed a redundant base64 encode/decode
• Removed messy extra message validation function
• Fixed an edge-case where a member granted supplemental access to the group could end up incorrectly kicked under the right conditions
• Fixed an issue where the copy for deleting a deprecated legacy group wasn't accurate
2 months ago
Morgan Pretty 3f3d4dde26 Fixed a number of issues found during general testing
• Added a 'forceSlowDatabaseQueries' dev setting to help track down main thread database queries
• Updated the unit tests to use a NoopNetworkCache by default when running unit tests
• Updated the custom debug sync query timer to poll more frequently for the first few iterations
• Fixed the broken unit tests
• Fixed the bad memory issue again (wasn't properly fixed...)
• Fixed an issue where the keyboard wouldn't reappear after deleting a message
• Fixed an issue where the toast shown after deleting a message could do a weird appearance animation
• Fixed an issue where legacy group invites were incorrectly still being handled once legacy groups were deprecated
• Fixed an issue where control messages could incorrectly leave a deletion artifact when triggering "delete before now"
• Fixed an issue where the typing indicator logic could run on the main thread (was also overly complex)
• Fixed an issue where we were clearing the incoming typing indicator too quickly (5s vs 15s like other platforms)
• Fixed an issue where the GroupPoller could incorrectly wait for longer than it should between polls if a message was deleted (there will be a better approach we should use in the future when we have an `active_at` flag for the conversation)
2 months ago
Morgan Pretty 8bb51968f0 Fixed some issues found during debugging & QA issues
• Added code to schedule any missing recurring jobs (so we no longer need to worry that the jobs have been lost or the migrations that added them ran correctly in their final state)
• Added the 'FailedGroupInvitesAndPromotionsJob' to flag invites/promotions which weren't sent before the app closed as failed
• Updated to the latest libweb
• Updated to the latest libSession
• Updated the config sync job to delay marking itself as failed if the network is not connected (it'll now observer the network status and trigger the failure callback when reconnected, which will result in another sync attempt shortly after - this will prevent a disabled network from building up the failure count excessively causing sync delays)
• Fixed a bad memory race condition which could occur with the new `Storage.performOperation` logic
2 months ago
Morgan Pretty 44b1d69551 Fixed a number of issues found during testing, and some QA issues
• Updated the SyncPushTokensJob to wait for a bit for paths to build before failing
• Updated the PushNotification service to be selectable via the dev settings
• Updated the database timeout code to be a little more developer friendly
• Updated the code to stop blocked contacts from appearing in the main conversation list
• Removed the invalid "push-testnet" push server
• Removed the logic to configure the APNS push service based on the service network (was incorrect)
• Removed the 'Int' raw type constraint for the 'FeatureOption'
• Fixed an issue where the initial conversation query for groups would fail due to an invalid join
• Fixed an issue where the initial conversation query wouldn't include the 'markedUnread' flag (meaning the conversation wouldn't correctly get marked as read)
• Fixed a rare bad memory crash
• Fixed an issue where the modal wouldn't be dismissed after updating the group display name
• Fixed an issue where the "Recreate Group" button was the wrong height
2 months ago
Morgan Pretty 245623b4c6 QA fixes and scope changes discussed today
• Removed the blocking loading indicators from a number of group actions
• Refactored the group promotions failure toast logic to match the invites failure toast logic
• Updated the actions which are allowed on messages in legacy groups once deprecated
• Updated to the latest libSession (minor PR feedback tweaks)
• Fixed a few build warnings
• Fixed a layout issue on the All Media screen
• Fixed an issue where the keyboard avoidance wouldn't be updated on the conversation screen if you went to a child screen and returned
• Fixed a couple of places where handling 'GROUP_MEMBER' changes could result in hitting the infinite loop guards so the changes wouldn't be reflected correctly
2 months ago
Morgan Pretty 11402b124f Fixed a few minor issues
• Fixed a possible incorrect crash report after importing data via the dev settings
• Fixed an issue where modals displayed after clearing the database data would have broken theming
• Fixed an issue where admin display name and pictures may not appear correctly in the message list when interleaved with control messages
2 months ago
Morgan Pretty 6830c68c31 Merge remote-tracking branch 'upstream/dev' into feature/groups-rebuild
# Conflicts:
#	Session/Calls/Call Management/SessionCall.swift
#	Session/Conversations/ConversationVC+Interaction.swift
#	Session/Conversations/ConversationVC.swift
#	Session/Meta/AppDelegate.swift
#	Session/Meta/MainAppContext.swift
#	Session/Notifications/PushRegistrationManager.swift
#	SessionMessagingKit/Jobs/GarbageCollectionJob.swift
#	SessionMessagingKit/Jobs/Types/UpdateProfilePictureJob.swift
#	SessionMessagingKit/LibSession/Config Handling/LibSession+Shared.swift
#	SessionMessagingKit/Sending & Receiving/MessageSender.swift
#	SessionMessagingKit/Utilities/ProfileManager.swift
#	SessionUtilitiesKit/Database/Storage.swift
#	SessionUtilitiesKit/JobRunner/JobRunner.swift
#	_SharedTestUtilities/SynchronousStorage.swift
2 months ago
Morgan Pretty d5add5bb79 Fixed a few more issues
• Minor tweak to config load order
• Pulled across reentrancy PR fixes
• Fixed an issue where some UI changes were occurring on background threads (causing crashes)
• Fixed an issue where editing a group name/description was performing a blocking action but not showing a loading indicator
• Fixed an issue where the group display picture modal would have it's "save" button enabled even when the picture hadn't been changed
2 months ago
Morgan Pretty 9081ff50f6 Made a couple of minor fixes
• Fixed an issue with database error logging
• Fixed an issue with a missing join in the query to update the app badge count
2 months ago
Morgan Pretty 529cb2e0f9 Added the legacy group deprecation logic (pending final copy)
• Added a separate feature flag for deprecating legacy groups
• Added the ability for a legacy group admin to "Recreate" the group (ie. pre-fill a new group with the same members)
• Updated the "Leave" button to be "Delete" for legacy groups once deprecated
• Disabled the "mark as unread" action for legacy groups once deprecated
• Disabled the input and conversation settings for legacy groups once deprecated
• Disabled the long press menu and removing reactions for legacy groups once deprecated
2 months ago
Morgan Pretty 4028cf1023 Database reentrancy fixes
• Reworked synchronous database access to prevent reentrancy issues
• Updated the JobExecuter to take a "Scheduler" rather than a "DispatchQueue" (allows for a potentially refactor to use "OperationQueue" instead if we want more fine-tuned control over the number of concurrent executions which can occur)
2 months ago
Morgan Pretty 0a7cd9a500 Fixed a few issues related to database reentrancy
• Reworked the database rentrancy fixes
• Added a timeout to prevent deadlocks with our custom synchronous database actions
• Fixed a case where we were incorrectly accessing the database in a reentrant way
2 months ago
Morgan Pretty dce05376d1 Fixed additional QA issues
• Updated the "Delete for Everyone" behaviour to show a blocking loading indicator if a network request is required
• Removed some duplicate code
• Fixed an issue where mentions wouldn't filter correctly for groups in some cases
• Fixed an issue where legacy group members could appear in the members list multiple times when navigating there from the conversation title
• Fixed an issue where the message deletion toasts could appear behind blurred modal backgrounds
• Fixed an issue where pasting text which is too large into an empty input field would result in the text having the default OS styling instead of the text styling we have set
2 months ago
Morgan Pretty ba3acaa2da Merge remote-tracking branch 'upstream/dev' into feature/groups-rebuild 2 months ago
Morgan Pretty e88a7ed453 Allow notifications from non-default namespaces, handle empty data 2 months ago
Morgan Pretty 442a8c7cb5 Merge remote-tracking branch 'upstream/dev' into feature/groups-rebuild 2 months ago
Ryan ZHAO 9207418100 Merge branch 'dev' into notification-patch 2 months ago
Morgan Pretty 1db80dfa13 Merge remote-tracking branch 'upstream/dev' into feature/groups-rebuild
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Calls/CallVC.swift
#	Session/Calls/WebRTC/WebRTCSession+MessageHandling.swift
#	Session/Calls/WebRTC/WebRTCSession.swift
#	Session/Meta/AppDelegate.swift
#	Session/Utilities/Permissions.swift
#	SessionMessagingKit/Sending & Receiving/Errors/MessageReceiverError.swift
#	SessionMessagingKit/Sending & Receiving/MessageReceiver.swift
#	SessionUtilitiesKit/General/SNUserDefaults.swift
2 months ago
Morgan Pretty 7b0f7ea8af Fixed a number of QA issues and other bugs founds
• Added a 2000 limit to the input field
• Added an error when opening the share extension before completing onboarding
• Updated the code to treat an empty `adminSignature` as null (in case a client sends it incorrectly)
• Updated the code to include updated group control messages when determining unread
• Updated code to perform a supplemental key rotation (if needed) when resending invites to members flagged as supplemental (to handle a case where the initial invite request failed)
• Updated the code to schedule group config update control messages when making the local changes but make their sending contingent on the next config sync succeeding
• Updated the code to only enable the Share and Notification extensions once the onboarding process has been completed
• Updated the code to always enqueue config syncs for all configs on launch (if there are no pending changes then it won't do anything, but if there are then this will increase the likelihood that they will be synced)
• Fixed an issue where the default contacts query was based on thread records instead of contact records
• Fixed an issue where creating a conversation by tapping on a group member or avatar wasn't correctly creating the conversation in the draft state
• Fixed an issue where incoming messages could be added to the "Note to Self" conversation if the "syncTarget" was incorrectly set on them
2 months ago
Morgan Pretty 81242de035 Fixed a few more QA issues
• Added some localised copy
• Added the helpdesk article URL for the deprecated groups banner
• Updated mentions to include the current user in groups, 1-1 and NTS conversations (also made the current user appear as "you")
• Fixed a layout issue with the deleted message view
• Fixed an issue where the "mark as unread" action would incorrectly appear for the Note to Self conversation
• Fixed an issue where we were incorrectly sending an ExpirationTimerUpdate in some cases
2 months ago