• Reworked the NotificationServiceExtension to just always reset and reload it's state to avoid weird bugs
• Updated the legacy group messages to fallback to using a locally generated serverHash if one isn't provided (always happens for legacy PNs)
• Include error info when failing to process extension logs
• Made a bunch of the Storage functions instance functions instead of static functions
Doing a config push was working via `Atomic.wrappedValue` instead of `Atomic.mutate` - we need to use `Atomic.mutate` in this case because we want to block other threads from modifying the config while we are doing a push (otherwise it can crash due to data changing while generating the push payload)
There were a few logs related to bad memory access within libSession and the `toLibSession` convention which we'd originally setup made me nervous as C-friendly objects would be allocated in Swift and then assigned to C struct properties but I'm not sure how the memory would actually behave in this case.
This updated approach unfortunately involves a bunch of duplicate code within 'TypeConversion+Utilities' (and some horrible type aliases for tuples) but as a result we now have compile-time safe 'get' and 'set' functions for any C struct which conforms to `CAccessible` and `CMutable`. The other nice benefit about this change is that the new `set` functions copy memory across into the C structs so we can have more confidence that the memory ownership has shifted to the libSession side of things.
• Fixed an issue where creating a legacy group could be blocked by the legacy PN subscription failing (was part of the synchronous request)
• Fixed an issue where the code would incorrectly use profile data from incoming messages sent from the current user to update it's profile info
• Fixed an issue where saving media would fail silently if the user had rejected the OS permission
• Refactored a little code around profile changes to make things more readable
• Fixed an issue where the background task to finish sending messages may not have sent the sync message or the main message after and upload
• Fixed an issue where the SessionBackgroundTask was incorrectly reporting a failure to be created
• Fixed an incorrect modal action colour
• Fixed a crash when creating legacy groups
• Updated the code so that we take charge of resolving the deadlock issue instead of relying on GRDB to do it
• Updated the logic to timeout the SessionBackgroundTask with 5 seconds of background time remaining (to ensure we have enough time to suspend the network & database)
Fixed a bug where we were incorrectly generating and requiring 64 byte secrets for legacy groups (we only need 32 bytes), since we do length checks before calling the libSession C API (to prevent crashes) we would fail before attempting to decrypt because the key was too short
• Remove the data change animations on the settings screens as they were causing frequent crashes
• Fixed an issue where deleting a message request via settings would dismissing the settings screen
• Fixed an issue where incoming legacy group messages were failing to decrypt
• Fixed an issue where decoding push notifications could result in an infinite loop
• Fixed an issue where the extensions would incorrectly try to append extension logs (only want the main app to do this)
• Updated the accessibility ids for the switches and radios on the privacy and disappearing message settings screens