Commit Graph

333 Commits

Author SHA1 Message Date
Morgan Pretty 6d6d45b283 Updated the ProfilePictureView to only use YYImage for Gif and WebP images
Added support for animated OpenGroup images
2022-08-15 10:35:52 +10:00
Morgan Pretty ea32e407a9 Applied theming to a number of screens, some minor cleanup and bug fixes
Updated the HomeVC, SettingsVC and GlobalSearch UI to use theming
Removed the "fade view" gradients from the various screens
Added a simple log to the PagedDatabaseObserver to make debugging easier
Updated the FullConversationCell to also show the "read" state for messages
Updated the read receipt icons to use SFSymbols directly
Updated the PlaceholderIcon to use the PrimaryColour's as it's colour options
2022-08-12 17:28:00 +10:00
Morgan Pretty d56cee8234 Progressing on theming functionality
Created the ThemeManager and the system to control the dynamic theming
Started updating the main settings screens
Added the AppearanceViewController and connected it to the ThemeManager
Started adding theme values
Started applying theme values throughout
2022-08-12 13:35:17 +10:00
Ryan Zhao 91afad99d5 Merge branch 'database-refactor' into emoji-reacts 2022-08-08 10:16:07 +10:00
Morgan Pretty 1224e539ea Reduced unneeded DB write operations and fixed a few minor UI bugs
Updated the database to better support the application getting suspended (0xdead10cc crash)
Updated the SOGS message handling to delete messages based on a new 'deleted' flag instead of 'data' being null
Updated the code to prevent the typing indicator from needing a DB write block as frequently
Updated the code to stop any pending jobs when entering the background (in an attempt to prevent the database suspension from causing issues)
Removed the duplicate 'Capabilities.Capability' type (updated 'Capability.Variant' to work in the same way)
Fixed a bug where a number of icons (inc. the "download document" icon) were the wrong colour in dark mode
Fixed a bug where the '@You' highlight could incorrectly have it's width reduced in some cases (had protection to prevent it being larger than the line, but that is a valid case)
Fixed a bug where the JobRunner was starting the background (which could lead to trying to access the database once it had been suspended)
Updated to the latest version of GRDB
Added some logic to the BackgroundPoller process to try and stop processing if the timeout is triggered (will catch some cases but others will end up logging a bunch of "Database is suspended" errors)
Added in some protection to prevent future deferral loops in the JobRunner
2022-08-05 17:10:01 +10:00
ryanzhao 99e4614bf8 Merge branch 'database-refactor' into emoji-reacts 2022-08-05 09:54:13 +10:00
Morgan Pretty ecbded3819 Cleaned up the poller logic a bit 2022-08-04 18:09:03 +10:00
ryanzhao f99ae07309 Merge branch 'database-refactor' into emoji-reacts 2022-08-02 09:35:55 +10:00
Morgan Pretty 8f3e7fc36a Removed the debug code and added a migration to remove the old YDB
Fixed a typo
2022-08-01 16:53:05 +10:00
Morgan Pretty 4d5ded7557 Fixed a few bugs with media attachment handling, added webp support
Updated the OpenGroupManager to create a BlindedIdLookup for messages within the `inbox` (validating that the sessionId does actually match the blindedId)
Added support for static and animated WebP images
Added basic support for HEIC and HEIF images
Fixed an issue where the file size limit was set to 10,000,000 bytes instead of 10,485,760 bytes (which is actually 10Mb)
Fixed an issue where attachments uploaded by the current user on other devices would always show a loading indicator
Fixed an issue where media attachments that don't contain width/height information in their protos weren't updating the values once the download was completed
Fixed an issue where the media view could download an invalid file and endlessly appear to be downloading
2022-07-29 15:26:24 +10:00
ryanzhao 8920cbdc28 Merge branch 'database-refactor' into emoji-reacts 2022-07-29 09:15:36 +10:00
Morgan Pretty c022f7cda2 Added an exponential back-off to polling open groups when they fail to poll 2022-07-28 18:26:22 +10:00
Morgan Pretty aed1b73185 Fixed a few additional issues uncovered
Added a explicit "timeout" error to make debugging a little easier
Added code to prevent the AttachmentUploadJob from continuing to try to upload if it's associated interaction has been deleted
Updated the getDefaultRoomsIfNeeded to make an unauthenticated sequence all to get both capabilities and rooms (so we will know if the server is blinded and retrieve the room images using blinded auth)
Fixed a bug where the notification badge wouldn't get cleared when removing data from a device
Fixed a bug where adding an open group could start with an invalid 'infoUpdates' value resulting in invalid data getting retrieved
Fixed a bug where under certain circumstances the PagedDatabaseObserver was filtering out updates (noticeable when restoring a device, would happen if the currentCount of content was smaller than the pageSize)
2022-07-26 11:36:32 +10:00
Morgan Pretty 9859cf95a4 Attempted to fix the notification & call reporting issues
Fixed an issue where fileIds weren't correctly getting sent along with open group messages
Fixed an issue where the screens could miss updates if the device was locked with the app in the foreground and then later unlocked after receiving notifications
Added an optimisation to prevent attempting to send a message after it has been deleted
Added logic to report fake calls if the code goes down an invalid code path when handling a call (to prevent Apple blocking the app)
Delayed the core which clears notifications to increase the time the app has to handle interactions (just in case it was a race condition)
2022-07-25 17:03:09 +10:00
Morgan Pretty c25f378c54 Merge branch 'feature/database-refactor' into emoji-reacts
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Conversations/Context Menu/ContextMenuVC+Action.swift
#	Session/Conversations/Context Menu/ContextMenuVC+ActionView.swift
#	Session/Conversations/Context Menu/ContextMenuVC.swift
#	Session/Conversations/ConversationVC+Interaction.swift
#	Session/Conversations/ConversationVC.swift
#	Session/Conversations/ConversationViewItem.h
#	Session/Conversations/ConversationViewItem.m
#	Session/Conversations/Message Cells/Content Views/LinkPreviewView.swift
#	Session/Conversations/Message Cells/MessageCell.swift
#	Session/Conversations/Message Cells/VisibleMessageCell.swift
#	Session/Conversations/Views & Modals/BodyTextView.swift
#	Session/Meta/Translations/en.lproj/Localizable.strings
#	Session/Shared/UserCell.swift
#	SessionMessagingKit/Jobs/MessageSendJob.swift
#	SessionMessagingKit/Messages/Signal/TSMessage.h
#	SessionMessagingKit/Messages/Signal/TSMessage.m
#	SessionMessagingKit/Messages/Visible Messages/VisibleMessage.swift
#	SessionMessagingKit/Open Groups/OpenGroupAPIV2.swift
#	SessionMessagingKit/Sending & Receiving/MessageReceiver+Handling.swift
#	SessionMessagingKit/Sending & Receiving/Notifications/NotificationsProtocol.h
#	SessionMessagingKit/Sending & Receiving/Pollers/OpenGroupPollerV2.swift
#	SessionMessagingKit/Utilities/General.swift
#	SessionNotificationServiceExtension/NSENotificationPresenter.swift
#	SignalUtilitiesKit/Utilities/DisplayableText.swift
#	SignalUtilitiesKit/Utilities/NoopNotificationsManager.swift
#	SignalUtilitiesKit/Utilities/Notification+Loki.swift
2022-07-25 15:39:56 +10:00
Morgan Pretty 3c07a2d044 Added linting for the localized strings, updated the quote & mention behaviour for the current user
Added a script and build step to error if we have localised a string in code bug don't have an entry in the localisable files
Added the logic and UI to replace the current users public key (or blinded key) with 'You' in mentions and quotes
Cleaned up some duplicate & missing localised strings
Fixed a bug where new closed groups weren't getting setup locally correctly
Updated the id truncating behaviour to always truncate from the middle
2022-07-15 18:15:28 +10:00
Morgan Pretty 5b6be3912d Fixed an edge-case crash, a couple of minor bugs and made future-proofing tweaks
Fixed a bit of the OnionRequest error handling to better send through server error messages for debugging
Fixed a bug where the initial offset could be negative if the number of messages was less than the page size resulting in a crash
Fixed a crash due to a code path which was thought to be impossible exiting but is actually possible (so just erroring)
Added the 'expire' SnodeAPI endpoint
Removed the 'openGroupServerTimestamp' property (was unused and just added confusion)
Updated the logic to always handle the 'fileId' for uploads/downloads as a string instead of casting it to an Int64
Updated the OpenGroup room parsing to support either Int or String values for image ids
2022-07-12 17:43:52 +10:00
Morgan Pretty b4ab521713 Fixed a bug with the message request UI and with recurring job retrying
Fixed a bug where jobs that recur on launch or active could end up endlessly retrying if they failed once
Fixed a bug where the message request UI would appear for outgoing message requests
2022-07-11 14:26:23 +10:00
Morgan Pretty 4afddd6fbb Fixed a number of reported bugs, some cleanup, added animated profile support
Added support for animated profile images (no ability to crop/resize)
Updated the message trimming to only remove messages if the open group has 2000 messages or more
Updated the message trimming setting to default to be on
Updated the ContextMenu to fade out the snapshot as well (looked buggy if the device had even minor lag)
Updated the ProfileManager to delete and re-download invalid avatar images (and updated the conversation screen to reload when avatars complete downloading)
Updated the message request notification logic so it will show notifications when receiving a new message request as long as the user has read all the old ones (previously the user had to accept/reject all the old ones)
Fixed a bug where the "trim open group messages" toggle was accessing UI off the main thread
Fixed a bug where the "Chats" settings screen had a close button instead of a back button
Fixed a bug where the 'viewsToMove' for the reply UI was inconsistent in some places
Fixed an issue where the ProfileManager was doing all of it's validation (and writing to disk) within the database write closure which would block database writes unnecessarily
Fixed a bug where a message request wouldn't be identified as such just because it wasn't visible in the conversations list
Fixed a bug where opening a message request notification would result in the message request being in the wrong state (also wouldn't insert the 'MessageRequestsViewController' into the hierarchy)
Fixed a bug where the avatar image wouldn't appear beside incoming closed group message in some situations cases
Removed an error log that was essentially just spam
Remove the logic to delete old profile images when calling save on a Profile (wouldn't get called if the row was modified directly and duplicates GarbageCollection logic)
Remove the logic to send a notification when calling save on a Profile (wouldn't get called if the row was modified directly)
Tweaked the message trimming description to be more accurate
Cleaned up some duplicate logic used to determine if a notification should be shown
Cleaned up some onion request logic (was passing the version info in some cases when not needed)
Moved the push notification notify API call into the PushNotificationAPI class for consistency
2022-07-08 17:53:48 +10:00
Morgan Pretty 6b9a19c761 Fixed a few more bugs and made a couple of optimisations to the GarbageCollectionJob
Added an index on Quote.authorId and added a garbage collection job to remove orphaned Profile entries
Added a few more indexes to improve the GarbageCollectionJob performance
Added some debug code to force a re-migration on next launch if the DB is invalid (only affects testers so code should be removed)
Fixed an issue where the GetSnodePool job wasn't properly blocking
Fixed an issue where a user could send the same message multiple times if they clicked the send button quickly enough
Fixed an issue where profiles might not have been getting created correctly for ClosedGroup members which have no threads/interactions
2022-07-05 16:47:12 +10:00
Morgan Pretty 34fea96db3 Fixed a bunch more bugs around push notifications and avatars
Added code to prevent the garbage collection job from auto-running more often than once every 23 hours
Fixed a bug where if the first avatar you try to add is your own, it could fail due to the folder not getting created
Fixed a bug where updating your profile would store and send an invalid profile picture url against your profile
Fixed an issue where the closed group icon wouldn't appear as the double icon when it couldn't retrieve a second profile
Fixed a bug where the device might not correctly register for push notifications in some cases
Fixed a bug where interacting with a notification when the app is in the background (but not closed) wasn't doing anything
Fixed a bug where the SyncPushTokensJob wouldn't re-run correctly in some cases if the user was already registered
Updated the profile avatar downloading logic to only download avatars if they have been updated
Updated the migration and OpenGroupManager to force Session-run open groups to always use the OpenGroupAPI.defaultServer value
2022-07-04 17:36:48 +10:00
Morgan Pretty 8cf2a57fcc Renamed GRDBStorage to Storage (no use having the prefix anymore since the old DB is deprecated) 2022-07-01 13:08:45 +10:00
Morgan Pretty eb0118ac10 Fixed a few more bugs and tweaked attachment download logic
Updated the code to only auto-start attachment downloads when a user opens a conversation (and only for the current page of messages)
Updated the GarbageCollectionJob to default to handling all cases (instead of requiring the cases to be defined) - this means we can add future cases without having to recreate the default job
Added logic to remove approved blinded contact records as part of the GarbageCollectionJob
Added code to better handle "invalid" attachments when migrating
Added a mechanism to retrieve the details for currently running jobs (ie. allows us to check for duplicate concurrent jobs)
Resolved the remaining TODOs in the GRDB migration code
Cleaned up DB update logic to update only the targeted columns
Fixed a bug due to a typo in a localised string
Fixed a bug where link previews without images or with custom copy weren't being processed as link previews
Fixed a bug where Open Groups could display with an empty name value
2022-07-01 12:52:41 +10:00
Morgan Pretty c7e8071dd1 Fixed a large number of bugs and added a setting to control open group message deletion
Added a setting to control whether open group messages older than 6 months should be pruned
Added some defensive coding to prevent an edge-case which could cause a crash (wasn't filtering out a potential invalid row from the home screen data)
Fixed a bug where preOffer call messages weren't correctly sending push notifications
Fixed a bug where all incoming calls would be rejected and seen as calls disabled
Fixed a bug where the copy on call info messages was displaying the sender's name instead of the thread contact's name for outgoing calls
Fixed a bug where the input view wouldn't appear when creating new DM conversations
Fixed a bug where threads might not show the message request approval UI
Fixed an issue where some logic might not have run correctly when first registering an account
Fixed a bug where the note to self thread could incorrectly appear when restoring a device
Updated the GarbageCollectionJob to run onActive instead of onLaunch (since it's likely we will rarely launch)
Updated the logic for erasing an account from a device
2022-06-29 18:10:10 +10:00
Morgan Pretty 76f7e4e246 Fixed a number of bugs, added in logic to handle id blinding being enabled and migrated session SOGS IPs to domains
Added logic to handle the case when ID blinded gets switched on server-side and the app already has open groups with cached capabilities
Added logic to migrate users from using HTTP and IP-based session open groups to use the HTTPS domain name url instead
Fixed a bug with the PushNotificationAPI update registration response structure
Fixed some broken unit tests (and a bug which was introduced in an earlier optimisation)
Fixed a bug where trusting a contact (to download their messages) wouldn't trigger the message UI to update
Fixed a bug where tapping a push notification wasn't opening the associated thread when the app isn't running in the background
2022-06-28 17:53:03 +10:00
Morgan Pretty 20dc74bc96 Added paging to the Home/MessageRequests screens and fix a bunch of bugs
Added a cache to the Identicon to prevent unneeded image generation
Replaced some 'withTint' calls to use the standard 'withRenderingMode' instead
Fixed a bug where the background would remain when swiping to reply
Fixed a crash which could occur with String-based settings
Fixed an issue where all messages in a thread wouldn't get marked as read when opening the thread (ie. existing behaviour)
Fixed a bug where going to the all media screen from a specific
Fixed a bug where the 'areCallsEnabled' preference wasn't getting migrated
Fixed a bug where you couldn't join any of the default open groups
Fixed a bug where it was polling for the invalid placeholder default open group
Fixed a few threading issues related to PromiseKit defaulting to run on the main thread
Updated and number of processes to run on "default" priority queues intead of "userInitiated" ones (since the docs suggest those are blocking)
Optimised the PagedDatabaseObserver to do a much more efficient count query
Updated the PagedDatabaseObserver to allow for triggering content updates when data changes outside of the paged or associated tables changes
Updated the HomeVC and MessageRequestsViewController to use paged queries
Made some optimisations to prevent unneeded database changes
2022-06-24 18:29:45 +10:00
Morgan Pretty 8288680f72 Added a restore account button to the failed migrations alert
Fixed a couple of bugs around restoring the "approved" state for message requests
Fixed a bug where the last message body for conversations was incorrectly trying to include deleted messages
2022-06-23 17:30:18 +10:00
Morgan Pretty 346ce3d24a Added a button to the settings screen to trigger a re-migration of the database 2022-06-23 15:52:50 +10:00
Morgan Pretty 4a29ad1f4f Fixed a few bugs with scrolling behaviour on the conversation screen
Fixed a couple of bugs with in-conversation search
2022-06-22 18:32:17 +10:00
Morgan Pretty a998cadbb7 Fixed the broken unit tests
Fixed a few bugs uncovered by the unit tests
2022-06-22 14:27:34 +10:00
Morgan Pretty 3261f12ea7 Added a missing new function 2022-06-21 14:13:41 +10:00
Ryan Zhao c91bdb3aeb refactor: persist recent used emojis 2022-06-20 15:31:54 +10:00
Morgan Pretty 428cc95ec2 Started working on fixing the broken unit tests
Updated the GRDB storage to support custom writer injection
2022-06-16 14:30:14 +10:00
Morgan Pretty ff08579088 Added logic to for unblinding current conversation & bug fixes
Added logic to handle unblinding the conversation the user currently has open
Fixed a bug where the nav bar wouldn't appear when creating a new account
Fixed a bug where messages send to an open group inbox weren't getting their open group server id set (causing duplicates)
Fixed a bug where the interaction/gallery data might not get updated in certain cases
Fixed an issue where visible messages which were getting sent over 24 hours than when they were originally meant to be sent would fail due to clock offset issues
2022-06-16 13:14:56 +10:00
Morgan Pretty 07f4f7a4ea Added code to ignore migrating open group messages older than 6 months 2022-06-09 19:00:43 +10:00
Morgan Pretty eeccfb47d5 Fixed all of the build errors from merge, migrated Call logic, started idBlinding migration and bug fixes
Fixed some broken file paths
Fixed a couple of bugs with closed groups
Fixed a few migration issues
Fixed a bug with the ProfilePictureView in open groups (was including the open parenthesis in the initials)
Migrated the Id Blinding changes to work with GRDB
Migrated the call logic to work with GRDB
Updated the code to work the with hard fork changes
2022-06-09 18:37:44 +10:00
Morgan Pretty 290bce5ce0 Merge branch 'feature/session-id-blinding-part-2' into feature/database-refactor
# Conflicts:
#	Podfile
#	Podfile.lock
#	Session.xcodeproj/project.pbxproj
#	Session/Closed Groups/EditClosedGroupVC.swift
#	Session/Closed Groups/NewClosedGroupVC.swift
#	Session/Conversations/Context Menu/ContextMenuVC+Action.swift
#	Session/Conversations/Context Menu/ContextMenuVC.swift
#	Session/Conversations/ConversationMessageMapping.swift
#	Session/Conversations/ConversationSearch.swift
#	Session/Conversations/ConversationVC+Interaction.swift
#	Session/Conversations/ConversationVC.swift
#	Session/Conversations/ConversationViewItem.h
#	Session/Conversations/ConversationViewItem.m
#	Session/Conversations/ConversationViewModel.m
#	Session/Conversations/Input View/InputView.swift
#	Session/Conversations/Input View/MentionSelectionView.swift
#	Session/Conversations/LongTextViewController.swift
#	Session/Conversations/Message Cells/Content Views/LinkPreviewView.swift
#	Session/Conversations/Message Cells/MessageCell.swift
#	Session/Conversations/Message Cells/VisibleMessageCell.swift
#	Session/Conversations/Settings/OWSConversationSettingsViewController.m
#	Session/Conversations/Views & Modals/ConversationTitleView.swift
#	Session/Conversations/Views & Modals/DownloadAttachmentModal.swift
#	Session/Conversations/Views & Modals/JoinOpenGroupModal.swift
#	Session/Conversations/Views & Modals/LinkPreviewModal.swift
#	Session/Conversations/Views & Modals/MessagesTableView.swift
#	Session/Conversations/Views & Modals/URLModal.swift
#	Session/Home/GlobalSearch/GlobalSearchViewController.swift
#	Session/Home/HomeVC.swift
#	Session/Home/Message Requests/MessageRequestsViewController.swift
#	Session/Media Viewing & Editing/MediaDetailViewController.m
#	Session/Media Viewing & Editing/MediaPageViewController.swift
#	Session/Meta/AppDelegate.m
#	Session/Meta/AppDelegate.swift
#	Session/Meta/AppEnvironment.swift
#	Session/Meta/Signal-Bridging-Header.h
#	Session/Meta/Translations/en.lproj/Localizable.strings
#	Session/Meta/Translations/hi.lproj/Localizable.strings
#	Session/Meta/Translations/si.lproj/Localizable.strings
#	Session/Meta/Translations/zh-Hant.lproj/Localizable.strings
#	Session/Notifications/AppNotifications.swift
#	Session/Open Groups/JoinOpenGroupVC.swift
#	Session/Settings/NukeDataModal.swift
#	Session/Settings/SeedModal.swift
#	Session/Settings/SettingsVC.swift
#	Session/Settings/ShareLogsModal.swift
#	Session/Shared/ConversationCell.swift
#	Session/Shared/UserSelectionVC.swift
#	Session/Utilities/BackgroundPoller.swift
#	Session/Utilities/MentionUtilities.swift
#	Session/Utilities/MockDataGenerator.swift
#	SessionMessagingKit/Database/OWSPrimaryStorage.m
#	SessionMessagingKit/Database/SSKPreferences.swift
#	SessionMessagingKit/Database/Storage+Contacts.swift
#	SessionMessagingKit/Database/Storage+Jobs.swift
#	SessionMessagingKit/Database/Storage+Messaging.swift
#	SessionMessagingKit/Database/Storage+OpenGroups.swift
#	SessionMessagingKit/Database/TSDatabaseView.m
#	SessionMessagingKit/File Server/FileServerAPIV2.swift
#	SessionMessagingKit/Jobs/AttachmentDownloadJob.swift
#	SessionMessagingKit/Jobs/AttachmentUploadJob.swift
#	SessionMessagingKit/Jobs/JobQueue.swift
#	SessionMessagingKit/Jobs/MessageReceiveJob.swift
#	SessionMessagingKit/Jobs/MessageSendJob.swift
#	SessionMessagingKit/Jobs/NotifyPNServerJob.swift
#	SessionMessagingKit/Messages/Control Messages/ClosedGroupControlMessage.swift
#	SessionMessagingKit/Messages/Control Messages/ConfigurationMessage+Convenience.swift
#	SessionMessagingKit/Messages/Message+Destination.swift
#	SessionMessagingKit/Messages/Signal/TSIncomingMessage.h
#	SessionMessagingKit/Messages/Signal/TSIncomingMessage.m
#	SessionMessagingKit/Messages/Signal/TSInfoMessage.h
#	SessionMessagingKit/Messages/Signal/TSInfoMessage.m
#	SessionMessagingKit/Messages/Signal/TSInteraction.h
#	SessionMessagingKit/Messages/Signal/TSInteraction.m
#	SessionMessagingKit/Messages/Signal/TSMessage.h
#	SessionMessagingKit/Messages/Signal/TSMessage.m
#	SessionMessagingKit/Open Groups/OpenGroupAPIV2+ObjC.swift
#	SessionMessagingKit/Open Groups/OpenGroupAPIV2.swift
#	SessionMessagingKit/Open Groups/OpenGroupManagerV2.swift
#	SessionMessagingKit/Open Groups/OpenGroupMessageV2.swift
#	SessionMessagingKit/Sending & Receiving/Mentions/MentionsManager.swift
#	SessionMessagingKit/Sending & Receiving/MessageReceiver+Decryption.swift
#	SessionMessagingKit/Sending & Receiving/MessageReceiver+Handling.swift
#	SessionMessagingKit/Sending & Receiving/MessageReceiver.swift
#	SessionMessagingKit/Sending & Receiving/MessageSender+ClosedGroups.swift
#	SessionMessagingKit/Sending & Receiving/MessageSender+Encryption.swift
#	SessionMessagingKit/Sending & Receiving/MessageSender.swift
#	SessionMessagingKit/Sending & Receiving/Notifications/NotificationsProtocol.h
#	SessionMessagingKit/Sending & Receiving/Pollers/ClosedGroupPoller.swift
#	SessionMessagingKit/Sending & Receiving/Pollers/OpenGroupPollerV2.swift
#	SessionMessagingKit/Sending & Receiving/Pollers/Poller.swift
#	SessionMessagingKit/Storage.swift
#	SessionMessagingKit/Threads/Notification+Thread.swift
#	SessionMessagingKit/Threads/TSContactThread.h
#	SessionMessagingKit/Threads/TSContactThread.m
#	SessionMessagingKit/Threads/TSGroupModel.h
#	SessionMessagingKit/Threads/TSGroupModel.m
#	SessionMessagingKit/Threads/TSGroupThread.m
#	SessionMessagingKit/Utilities/General.swift
#	SessionNotificationServiceExtension/NSENotificationPresenter.swift
#	SessionNotificationServiceExtension/NotificationServiceExtension.swift
#	SessionSnodeKit/OnionRequestAPI+Encryption.swift
#	SessionSnodeKit/OnionRequestAPI.swift
#	SessionSnodeKit/SnodeAPI.swift
#	SessionSnodeKit/SnodeMessage.swift
#	SessionSnodeKit/Storage+SnodeAPI.swift
#	SessionSnodeKit/Storage.swift
#	SessionUtilitiesKit/General/Array+Utilities.swift
#	SessionUtilitiesKit/General/Dictionary+Utilities.swift
#	SessionUtilitiesKit/General/SNUserDefaults.swift
#	SessionUtilitiesKit/General/Set+Utilities.swift
#	SessionUtilitiesKit/Meta/SessionUtilitiesKit.h
#	SessionUtilitiesKit/Utilities/Optional+Utilities.swift
#	SessionUtilitiesKit/Utilities/Sodium+Conversion.swift
#	SignalUtilitiesKit/Configuration.swift
#	SignalUtilitiesKit/Database/Migrations/OpenGroupServerIdLookupMigration.swift
#	SignalUtilitiesKit/Messaging/FullTextSearcher.swift
#	SignalUtilitiesKit/Messaging/Sending & Receiving/MessageSender+Convenience.swift
#	SignalUtilitiesKit/Profile Pictures/Identicon+ObjC.swift
#	SignalUtilitiesKit/To Do/OWSProfileManager.m
#	SignalUtilitiesKit/Utilities/NoopNotificationsManager.swift
#	SignalUtilitiesKit/Utilities/UIView+OWS.swift
2022-06-08 14:29:51 +10:00
Morgan Pretty af073657a2 Cleaned up received message handling and a few bugs with duplicate message handling
Updated the YDB to GRDB migrations to include some progress when importing swarms & interactions (ie. the slow parts we can't properly show progress for)
Changed the MessageReceiveJob into a MessageHandlingJob (when receiving a message we now parse and store everything immediately to avoid a number of weird edge-cases)
Fixed a bug where the Poller would drop a Snode when returning from the background because it's last request would generally time out
Fixed a few bugs with invalid attachments
Added the ability to retry downloading a failed attachment
Added back the search results limit
2022-06-03 15:47:16 +10:00
Morgan Pretty 9216506847 Merge branch 'dev' into feature/session-id-blinding-part-2
# Conflicts:
#	Session/Calls/Views & Modals/CallVideoView.swift
#	Session/Meta/Translations/de.lproj/Localizable.strings
#	Session/Meta/Translations/es.lproj/Localizable.strings
#	Session/Meta/Translations/fi.lproj/Localizable.strings
#	Session/Meta/Translations/fr.lproj/Localizable.strings
#	Session/Meta/Translations/hr.lproj/Localizable.strings
#	Session/Meta/Translations/it.lproj/Localizable.strings
#	Session/Meta/Translations/ja.lproj/Localizable.strings
#	Session/Meta/Translations/nl.lproj/Localizable.strings
#	Session/Meta/Translations/pl.lproj/Localizable.strings
#	Session/Meta/Translations/pt_BR.lproj/Localizable.strings
#	Session/Meta/Translations/ru.lproj/Localizable.strings
#	Session/Meta/Translations/si.lproj/Localizable.strings
#	Session/Meta/Translations/sk.lproj/Localizable.strings
#	Session/Meta/Translations/zh-Hant.lproj/Localizable.strings
#	Session/Meta/Translations/zh_CN.lproj/Localizable.strings
#	Session/Utilities/BackgroundPoller.swift
#	SessionSnodeKit/OnionRequestAPI.swift
#	SessionSnodeKit/SnodeAPI.swift
2022-06-02 14:41:08 +10:00
Morgan Pretty 93b54a3b7d Added logic for the GarbageCollectionJob
Fixed a bug where the GalleryRailView wasn't appearing
Fixed a database reentrancy error
Fixed a bug where the threadId for migrated attachmentUpload jobs wasn't getting set to the non-legacy version
Deleted the buggy overwritten 'delete' methods to avoid confusion
Updated the GroupMember table to cascade delete if it's thread is deleted (can't do so for the Closed/Open group but they share the same id conveniently)
Updated the 'isRunningTests' to be based on the existence of XCInjectBundleInfo which seems to be more consistent than the old approach
2022-06-02 14:13:07 +10:00
Morgan Pretty 59696f7d2c Removed all the old Storage classes and YapDB extensions
Removed the AppUpdateNag code (unused)
Removed the Mantle dependency
2022-06-01 17:41:20 +10:00
Morgan Pretty 18d833f152 Optimised the home screen query (~50% speed improvement)
Updated to the latest version of GRDB
Renamed some variables for clarity
Updated the "seed viewed" banner on the HomeVC to be driven by a database setting to be consistent with other UI changes
2022-06-01 16:50:21 +10:00
Morgan Pretty 8ff542405c Finished of the Conversation screen and JobQueue concurrency
Updated the migrations to indicate progress (Potential to base progress for the "processing" sections on the file size of the legacy database)
Updated the JobRunner to properly support concurrent queues for sending/receiving (other queues are still serial)
Added the typing indicator logic into the ConversationVC
Put code into SUKLegacy for connecting to the YDB database
Fixed a couple of minor UI bugs with the GalleryRailView
Updated the media gallery selection screen to use the appropriate system theme colouring (was painful to randomly swap from dark mode to like for one screen...)
Added an alert for when the database migration fails
Deleted the legacy migrations (manually applying any unapplied changes as part of the YDB to GRDB migration process)
2022-05-31 17:41:02 +10:00
Morgan Pretty 26c7a5022a Added a simple migration progress indicator and animation (need timing tweaks)
Cleaned up the creation of the GRDBStorage instance
Fixed an issue where the launch screen wasn't setting it's background colour based on the system setting
Renamed the GRDBStorageError to StorageError (in preparation of legacy 'Storage' relocation)
Consolidated the two Environment classes (in Swift)
Refactored the AppSetup class to Swift
2022-05-30 13:04:26 +10:00
Morgan Pretty e2ee0e94ee Finished of the conversation screen and resolved a bug of bugs/TODOs
Fixed a number of scrolling behaviours in the ConversationVC
Fixed a bug with the PagedDataObserver when observing associated data (multiple associations with a single paged result were broken)
Fixed a bug with the PagedDataObserver where it would trigger updates for new entries even if the user is offset from the latest data
Fixed a bug where marking as read wasn't working properly
Fixed a bug where outgoing messages were being considered unread
Added an error state for a failed attachment send
Renamed a few types for clarity
Resolved a bunch of TODOs
2022-05-29 19:26:06 +10:00
Morgan Pretty 3514ed4f50 Updated the JobRunner to have multiple job queues (needs more testing)
Added a backoff to the Poller retry
Updated the "blocking" behaviour of the JobRunner
Tweaked the Job dependency handling to better handle orphaned dependencies
Fixed an issue where the Conversation screen wasn't observing database changes
2022-05-28 17:25:38 +10:00
Morgan Pretty 45d0faee6a Cleaned up the rest of the search functionality
Removed some debug text which appearing in the in-conversation search UI
Fixed a number of small UI glitches
2022-05-27 18:37:59 +10:00
Morgan Pretty 62c886e764 Got paging working on the conversation screen
Fixed a couple of issues where attachment messages would flicker due to thread changing
Fixed a couple of issues with page loading
Connected the global search result select back up
2022-05-26 18:13:16 +10:00
Morgan Pretty 19cd9d13c5 Cleaned up the ConversationVC query and started plugging in paging
Created a generic PagedDatabaseObserver (common logic for conversation & gallery paged database queries and observation)
Updated the MediaGallery to use the PagedDatabaseObserver
Split the interaction and thread data queries for the conversationVC
2022-05-25 18:48:04 +10:00
Morgan Pretty c500d4c6ca Fixed a few bugs, resolved a number of TODOs and deleted more unused code
Fixed a couple of bugs with search term highlighting (updated the logic to make the highlighted content follow similar logic to what terms would have actually matched)
Fixed a bug where info messages in search results weren't rendering correctly
Shifted some duplicate query code for global search into variables
Fixed a small bug where sending attachments could incorrectly result in the mentions UI being visible
Fixed a bug where quote content was appearing incorrectly
Consolidated the ShareExtension Item and the ConversationCell.ViewModel into one type (with a more-limited query) to remove duplicate code
Added back a missing asset (deleted a long time ago)
2022-05-23 17:16:14 +10:00
Morgan Pretty 49dd341b6d Removed some more legacy code which has been refactored 2022-05-23 12:23:43 +10:00
Morgan Pretty 9ada8b84e0 Removed a bunch of legacy code
Renamed the 'Legacy' classes to have their library prefix (avoid confusion)
Removed the legacy Objective C Thread code (pulled only the NSCoding stuff into the 'SMKLegacy' type)
2022-05-21 12:25:10 +10:00
Morgan Pretty aabf656d89 Finished off the MediaGallery logic
Updated the config message generation for GRDB
Migrated more preferences into GRDB
Added paging to the MediaTileViewController and sorted out the various animations/transitions
Fixed an issue where the 'recipientState' for the 'baseQuery' on the ConversationCell.ViewModel wasn't grouping correctly
Fixed an issue where the MediaZoomAnimationController could fail if the contextual info wasn't available
Fixed an issue where the MediaZoomAnimationController bounce looked odd when returning to the detail screen from the tile screen
Fixed an issue where the MediaZoomAnimationController didn't work for videos
Fixed a bug where the YDB to GRDB migration wasn't properly handling video files
Fixed a number of minor UI bugs with the GalleryRailView
Deleted a bunch of legacy code
2022-05-20 17:58:39 +10:00
Morgan Pretty a6c7e252a7 Added global search back
Removed the logic for 'oversizedText' (not sent by either iOS or Android and not handled at all by desktop)
Updated the HomeViewModel (and ConversationCell) to use the same query model as Global Search
Added an 'albumIndex' property to the InteractionAttachment so we can enforce a correct order (apparently SQLite doesn't do this by default)
Updated the YDB to GRDB migration to avoid creating GroupMembers if the current user isn't a member of a ClosedGroup (be consistent with the running logic)
Updated the attachment description logic to be consistent throughout
Cleaned up the Interaction preview generation logic
2022-05-17 17:47:56 +10:00
Ryan Zhao 965c1c48e5 add action to emoji reacts 2022-05-16 17:06:06 +10:00
Morgan Pretty 5bcc124388 Updated the SessionShareExtension to work with GRDB
Updated to the latest version of GRDB
Fixed an issue with db reentrant behaviour with the Attachment upload function
Finished up the updated 'sendNonDurability' functions
2022-05-15 14:39:21 +10:00
Morgan Pretty 8f120c4380 Started re-adding media gallery interactions (in progress)
Fixed up quote attachment sending and retrieval
Validated attachment sending and retrieving is working correctly
Re-added the AttachmentUploadJob migration
2022-05-13 18:07:24 +10:00
Morgan Pretty 5432f5582e Fixed a number of minor bugs, started re-connecting chat bubble interactions
Fixed an issue where if you left a closed group on one device you wouldn't leave it on another
Renamed a few types to clean up the namespacing and code jumping
Fixed a stack overflow issue which could occur in the JobRunner
Fixed an issue where the DeletedMessageView could randomly have the wrong height
Fixed an issue where you could interact with the hidden reply button on a cell
Fixed an issue where tapping anywhere horizontally would trigger the cell tap (need to tap within the bubble)
Disabled the ability to select text in messages (only works sometimes and is buggy)
2022-05-11 18:20:10 +10:00
Morgan Pretty 06eef99766 Cleared out some legacy code, fixed a few bugs, got typing indicators and mentions working
Got mentions working again
Got typing indicators working again
Got the notification sound and preview preferences working
Fixed a few issues with attachment image loading
Fixed an issue where enum settings weren't getting stored correctly
2022-05-10 17:42:15 +10:00
Morgan Pretty 0db74ce1e3 Working on the MediaGallery and ClosedGroup handling
Fixed a couple of issues around the duplicate messages handling
Fixed a few issues with ClosedGroup polling and ClosedGroup control message handling
Started working through updating the MediaGallery
2022-05-08 22:01:39 +10:00
Morgan Pretty b541666ef0 Got the ability to send message working again and other tweaks
Tested and fixed a couple of issues with the disappearingMessages job
Added a simple dependency system for jobs (primarily for the AttachmentUploadJob, but will likely be others later)
Setup the AttachmentUploadJob again (looks like there are cases which use it)
Prevented a possible infinite job deferral loop from causing the app to crash (the loop is still technically possible but the app will continue to run now)
Updated the interactions unique constraints based on testing and discussions around how the serverHash works
Deleted the legacy ReadReceipt handling (now managed via the 'interaction.wasRead' flag and 'SendReadReceiptsJob')
Deleted the unused SSKIncrementingIdFinder
2022-05-06 12:44:26 +10:00
ryanzhao 15b954dbd6 persist hardfork info 2022-05-04 10:14:15 +10:00
Morgan Pretty 32304ae5dd Cleared out some of the legacy serialisation logic, further UI binding
Refactored the SignalApp class to Swift
Fixed a horizontal alignment issue in the ConversationTitleView
Fixed an issue where expiration timer update messages weren't migrated or rendering correctly
Fixed an issue where expiring messages weren't migrated correctly
Fixed an issue where closed groups which had been left were causing migration failures (due to data incorrectly being assumed to be required)
Shifted the Legacy Attachment types into the 'SMKLegacy' namespace
Moved all of the NSCoding logic for the TSMessage
2022-05-03 17:14:56 +10:00
Morgan Pretty 3baeb981d9 Further work on the JobRunner
Moved the JobRunner into SessionUtilitiesKit so it can be used by SessionSnodeKit
Exposed a 'sharedLokiProject' value on UserDefaults to remove the hard-coded group name used everywhere
Added "blocking" job support for 'OnLaunch' and 'OnActive' jobs to the JobRunner (will retry until it succeeds)
Added the UpdateProfilePicture and RetrieveDefaultOpenGroupRooms jobs
2022-04-27 10:48:54 +10:00
Morgan Pretty 949b043867 Updated the unit tests to build with a host app (needed due to the x86_64 build requirement...)
Fixed the broken tests
2022-04-26 15:08:41 +10:00
Morgan Pretty 1c575e520d Merge remote-tracking branch 'upstream/voice-calls-2' into feature/session-id-blinding-part-2
# Conflicts:
#	Podfile.lock
#	Session.xcodeproj/project.pbxproj
#	Session/Conversations/ConversationVC+Interaction.swift
#	Session/Conversations/Views & Modals/JoinOpenGroupModal.swift
#	Session/Home/HomeVC.swift
#	Session/Open Groups/JoinOpenGroupVC.swift
#	Session/Utilities/BackgroundPoller.swift
#	SessionMessagingKit/Jobs/AttachmentUploadJob.swift
#	SessionMessagingKit/Open Groups/OpenGroupAPIV2.swift
#	SessionMessagingKit/Sending & Receiving/MessageReceiver+Handling.swift
#	SessionNotificationServiceExtension/NotificationServiceExtension.swift
2022-04-26 13:06:12 +10:00
Morgan Pretty ed9f4ea6c6 Fixed a few closed group and job issues
Fixed a few job migration issues
Fixed an issue with the closed group key pair management (wasn't storing keys correctly)
Refactored the OWSSound (now Preferences.Sound)
Added the logic for the AttachmentDownloadJob and enabled jobs to be cascade deleted via interactions
Optimised the HomeViewModel database observation query (fetch specific columns so changes outside those don't trigger updates)
Updated to the latest GRDB (ran into a deadlock which should be fixed in a newer version)
2022-04-22 18:47:11 +10:00
Morgan Pretty 11231599db Further work on migrations and message pipeline refactoring
Refactored the AppDelegate from Objective C to Swift
Updated the HomeVC to use GRDB
Refactored a number of the Job types to be driven via GRDB and the new JobRunner
Fixed a bug where the LinkPreviewView wouldn't render correctly in dark mode
2022-04-21 16:42:35 +10:00
Morgan Pretty 28553b218b Updated the migration to handle quotes and link previews 2022-04-11 17:30:42 +10:00
Morgan Pretty 4380f1975c Further work on the DB refactoring
Added the rest of the interaction structure to the database (testing some migration logic now - still needs to be finalised)
Updated the YDBToGRDB migrations to wrap their inserts in autorelease pools (helps memory slightly, unfortunately it's caching the YDB data which uses the most memory but we have opted for speed over RAM at the moment)
Updated the MockDataGenerator so it should now "chunk" the code generation (crazy large figures were previously resulting in excessive memory usage)
2022-04-08 16:56:33 +10:00
Morgan Pretty cf66edb723 Further work on SessionMessagingKit migrations
Added migrations for contacts and started working through thread migration (have contact and closed group threads migrating)
Deprecated usage of ECKeyPair in the migrations (want to be able to remove Curve25519Kit in the future)
2022-04-06 15:43:26 +10:00
Morgan Pretty 4ee4b3ffb3 Started adding migration logic for contacts
Updated the getUserHexEncodedPublicKey to take an optional db value so we can retrieve it during the initial migration
2022-04-04 13:18:14 +10:00
Morgan Pretty 72eeb1c796 Updated the Identity type to clear everything instead of just the x25519 pair 2022-04-04 09:58:47 +10:00
Morgan Pretty a1b4554cdb Migrated the SessionSnodeKit from YapDatabase to GRDB
Changed the min OS version to iOS 13.0 (support for 'Identifiable')
Removed the alternate approaches to fetching the userKeyPair and userPublicKeyHexString (no consistently routed through the caching method)
Migrated the 'OWSIdentityManager' logic to use the new 'Identity' type
Added the 'Setting' table and got the pattern working fairly nicely (unfortunately there isn't a good way to avoid key collision without proper enums)
Updated the SessionSnodeKit to migration it's data from YDB to GRDB
Updated the SessionSnodeKit to use GRDB throughout it's logic
2022-04-01 17:22:45 +11:00
Morgan Pretty e65682ae9b Merge branch 'dev' into feature/database-refactor
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Backups/OWSBackup.m
#	Session/Backups/OWSBackupImportJob.m
#	SessionSnodeKit/SnodeAPI.swift
2022-03-31 12:09:04 +11:00
Morgan Pretty 529e416dd1 Started work on GRDB logic and migrations
Setup a migration pattern
Setup the database configuration and security
Started defining the database schema
Started working on the migrations for SessionSnodeKit
2022-03-31 11:47:09 +11:00
Morgan Pretty 5ca227434b Merge branch 'dev' into feature/session-id-blinding-part-2
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Utilities/BackgroundPoller.swift
#	SessionMessagingKit/Database/Storage+OpenGroups.swift
#	SessionMessagingKit/Messages/Control Messages/ConfigurationMessage+Convenience.swift
#	SessionMessagingKit/Open Groups/OpenGroupAPIV2.swift
#	SessionMessagingKit/Open Groups/OpenGroupManagerV2.swift
#	SessionMessagingKit/Sending & Receiving/MessageSender.swift
#	SessionMessagingKit/Sending & Receiving/Pollers/OpenGroupPollerV2.swift
#	SessionMessagingKit/Sending & Receiving/Pollers/Poller.swift
#	SessionMessagingKit/Storage.swift
#	SessionMessagingKit/Utilities/General.swift
#	SessionSnodeKit/SnodeAPI.swift
#	SessionUtilitiesKit/General/Atomic.swift
2022-03-29 09:15:32 +11:00
Ryan Zhao fdde7e4fe0 Merge branch 'fix/tweaks-to-config-message-generation' of https://github.com/mpretty-cyro/session-ios into bug-fix-for-call 2022-03-24 16:33:10 +11:00
Morgan Pretty 1214005c59 Updated the cachedEncodedPublicKey to be Atomic
Added the Atomic wrapper for thread safe variables
2022-03-24 14:42:25 +11:00
Morgan Pretty c44256b1d6 Added more unit tests
Fixed a possible divide by zero error
Cleaned up some of the id blinding methods (ie. removing handling for impossible error states)
Added unit tests for the new Sodium methods (used for id blinding)
Added unit tests for some of the shared code
Added unit tests for the MessageSender+Encryption extension functions
Added unit tests for the MessageReceiver+Decryption extension functions
Updated the unit test key constants to be consistent with the SOGS auth-example keys for consistency
2022-03-18 16:39:25 +11:00
Morgan Pretty f9c2655df4 Finalised the OpenGroupAPI and more tests
Fixed an issue where messages where signed incorrectly when blinding wasn't enabled on a SOGS
Fixed an issue where a single invalid message would result in all messages in that request being dropped
Updated the final legacy endpoint (ban and delete all messages)
Moved the OpenGroupManager poller values into the 'Cache' (so they are thread safe)
Started adding unit tests for the OpenGroupManager
Removed some redundant parameters from the 'Request' type
2022-03-15 15:19:23 +11:00
Ryan Zhao a68ed28a7a Merge branch 'dev' into voice-calls-2 2022-03-09 11:33:18 +11:00
Morgan Pretty 3e0ccaea4c Merge branch 'dev' into feature/session-id-blinding-part-2
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Utilities/MentionUtilities.swift
#	SessionMessagingKit/Sending & Receiving/Pollers/OpenGroupPollerV2.swift
#	SessionMessagingKit/Sending & Receiving/Pollers/Poller.swift
#	SignalUtilitiesKit/Messaging/Sending & Receiving/MessageSender+Convenience.swift
2022-03-09 09:49:23 +11:00
Ryan Zhao 5762445128 Merge branch 'ipad-support-1' into voice-calls-2 2022-03-08 17:10:40 +11:00
Ryan Zhao 60e8da3bff Merge branch 'dev' into preformance-improvement 2022-03-08 11:08:45 +11:00
Morgan Pretty b6a6f77d4e Adding back code removed due to merge conflict 2022-03-08 10:45:58 +11:00
Morgan Pretty d298bcdb4e Merge branch 'dev' into feature/session-id-blinding-part-2
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Utilities/ContactUtilities.swift
#	SessionUtilitiesKit/General/Array+Utilities.swift
2022-03-08 10:41:05 +11:00
Morgan Pretty 17a9e510c5 Further work on unit tests (and a couple of bug fixes found when testing)
Removed a couple remaining TODOs
Added 'standardUserDefaults' to the 'Dependencies' type
Tweaked the OpenGroupAPI to only update the 'lastOpen' timestamp if it successfully polls
Refactored a couple of methods in the ConversationViewItem into swift so we can clean up the OpenGroupAPI more
Updated the OpenGroupAPI so it no longer has static variables for state (shifted to the OpenGroupManager and made them instance variables)
Fixed an encoding issue with the Capabilities.Capability
2022-03-07 17:43:30 +11:00
Morgan Pretty af543b980b Made a couple of changes to how the ConfigurationMessage is generated and handled
Stopped configuration messages from automatically creating threads for sync'ed contacts (now they will only be created if there are messages)
Updated the ConfigurationMessage to stop truncating the list of contacts but filter the full set (also update the logic to include previously approved contacts)
2022-03-07 10:22:46 +11:00
Morgan Pretty 1c474955de File upload working, further code cleanup
Got the updated file upload working
Removed the legacy 'room' header
Consolidated a number of types between SOGS, FileServer and general requests
Updated the OnionRequestAPI to deal with a Data payload (rather than encoding it to a string and then back to data)
2022-03-04 13:33:06 +11:00
Morgan Pretty c04d4544f2 Added more unit tests
Refactored the existing unit tests to use Quick
Started adding unit tests for a number of the OpenGroupAPI network models
Added unit tests for the SessionId type
2022-03-02 17:11:18 +11:00
Ryan Zhao 52407aec03 Merge branch 'ipad-support-1' into voice-calls-2 2022-03-02 14:31:31 +11:00
Morgan Pretty 6936f35f2a Fixed a few issues uncovered while testing and some cleanup
Fixed an incorrect optional in RoomPollInfo
Fixed an incorrect parameter name in the ClosedGroupRequestBody
Fixed a crash due to a change in the ContactUtilities
Cleaned up the duplicate code in the OnionRequestAPI, HTTP and SnodeAPI to all use 'Data' response types
Updated the SnodeAPI to casting types to Any (made it hard to catch breaking changes with HTTP and OnionRequestAPI)
2022-03-02 13:09:45 +11:00
Morgan Pretty 3e97782d18 Merge branch 'dev' into feature/session-id-blinding-part-2
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Conversations/ConversationVC.swift
#	Session/Meta/Translations/de.lproj/Localizable.strings
#	Session/Meta/Translations/en.lproj/Localizable.strings
#	Session/Meta/Translations/es.lproj/Localizable.strings
#	Session/Meta/Translations/fa.lproj/Localizable.strings
#	Session/Meta/Translations/fi.lproj/Localizable.strings
#	Session/Meta/Translations/fr.lproj/Localizable.strings
#	Session/Meta/Translations/hi.lproj/Localizable.strings
#	Session/Meta/Translations/hr.lproj/Localizable.strings
#	Session/Meta/Translations/id-ID.lproj/Localizable.strings
#	Session/Meta/Translations/it.lproj/Localizable.strings
#	Session/Meta/Translations/ja.lproj/Localizable.strings
#	Session/Meta/Translations/nl.lproj/Localizable.strings
#	Session/Meta/Translations/pl.lproj/Localizable.strings
#	Session/Meta/Translations/pt_BR.lproj/Localizable.strings
#	Session/Meta/Translations/ru.lproj/Localizable.strings
#	Session/Meta/Translations/si.lproj/Localizable.strings
#	Session/Meta/Translations/sk.lproj/Localizable.strings
#	Session/Meta/Translations/sv.lproj/Localizable.strings
#	Session/Meta/Translations/th.lproj/Localizable.strings
#	Session/Meta/Translations/vi-VN.lproj/Localizable.strings
#	Session/Meta/Translations/zh-Hant.lproj/Localizable.strings
#	Session/Meta/Translations/zh_CN.lproj/Localizable.strings
2022-02-28 10:46:45 +11:00
Ryan Zhao f22672ccd7 Merge branch 'dev' of https://github.com/oxen-io/session-ios into preformance-improvement 2022-02-25 14:58:20 +11:00
Morgan Pretty dbead5e3c8 Got the '/inbox' APIs and encryption/decryption/validation working
Added a few types to make the code more readable
Added the inbox request to the polling
Added a couple of properties to the TSContactThread to indicate the originating open group to support SOGS DMs
Added code to store the latest message id for an open group inbox
Added a bunch of documentation from the API docs into the OpenGroupAPI (and associated models)
Updated the OpenGroupAPI to match the latest docs
Fixed the incorrect structure of the SendDirectMessageRequest
Fixed an incorrect inbox endpoint path
Tweaked the batch response handling so it wouldn't fail to parse all responses if a single one failed
Renamed IdPrefix to SessionId.Prefix and cleaned up the type to be more readable & self-documenting
2022-02-25 11:59:29 +11:00
ryanzhao b2ab984586 refactor on timer and polling threading 2022-02-22 14:01:48 +11:00
Ryan Zhao eec3d31109 WIP: timer + main thread 2022-02-21 17:22:58 +11:00
Morgan Pretty 1edd500dab Updated to the latest blinding behaviour
Added a couple more dependencies for unit testing injection
Updated the MessageSender to set the sender of the message to the appropriate blinded/unblinded key
Updated the OpenGroup Message to handle verification of both blinded and unblinded messages
Updated the MessageSender to use dependency injection for it's sendToOpenGroupDestination method
Updated the JSONDecoder to support getting dependencies (for signature verification)
Fixed tests broken by updating the signing logic
2022-02-21 10:01:53 +11:00
Morgan Pretty ef09d4d5aa Additional encryption work on id blinding
Got the updated blinding logic working (at least when authenticating a request - still need to deal with message signing and verification)
Storing the server capabilities in the database now so we can correctly blind requests based on them
Renamed the remaining 'v2' functions and classes to just be 'OpenGroup' since there isn't a 'V2' anymore
Cleaned up a few TODOs and functions
2022-02-17 18:33:23 +11:00
Ryan Zhao cc1b1e8c51 poll for open groups in NSE 2022-02-17 14:55:32 +11:00
Morgan Pretty 999d4a1082 Merge branch 'dev' into feature/message-requests
# Conflicts:
#	Session/Conversations/ConversationVC+Interaction.swift
2022-02-17 11:52:23 +11:00
Morgan Pretty b655882cbd Started resolving TODOs
Added some new properties to the OpenGroupV2
Moved a number of methods and variables from OpenGroupAPI to OpenGroupManager (anything doing actual logic)
Moved the message signing into the OpenGroupAPI (since that's the only place it happens)
Renamed remaining old model classes to start with 'Legacy' to make clean up easier
Updated the OpenGroupAPI poll method to use the same logic as it previously did to determine if it should retrieve recent messages or messages since the last one
2022-02-16 10:31:08 +11:00
Ryan Zhao c32cc4d649 Merge branch 'feature/pdf-preview' of https://github.com/mpretty-cyro/session-ios into voice-calls-2 2022-02-16 09:38:52 +11:00
Morgan Pretty 4963a84ddd Added more unit tests for the OpenGroupAPI (fixed a couple bugs as well) 2022-02-15 16:00:51 +11:00
Morgan Pretty c90f346d6a Further SOGS V4 integration work
Added in the v4 onion requests logic
Added in the new pin/unpin APIs
Split up additional legacy methods to try and simplify the refactoring
Added a number of TODOs around usage of legacy request methods
2022-02-14 14:07:45 +11:00
Morgan Pretty 1b820c48c6 Added support for Microsoft Word, Excel & Powerpoint previews 2022-02-14 10:02:33 +11:00
Morgan Pretty 161a90ad28 Updated the code to show the document interaction controller for text files as well 2022-02-14 09:54:17 +11:00
Morgan Pretty 4f3900771e More work on getting SOGS V4 integrated
Updated the MessageSendJob to support V4 messages (V2 messages will be upgraded to V4 if they get re-encoded)
Renamed the Message+Destination from 'openGroup' & 'openGroupV2' to 'legacyOpenGroup' and 'openGroup'
Started plugging in more of the V4 APIs
Renamed a number of the V2 APIs to start with 'legacy'
2022-02-11 16:48:16 +11:00
Morgan Pretty 2284375fc0 Started work on updated SOGS support
Split the OpenGroupAPIV2 into separate files
Started working on the new auth and blinded-id approaches (new auth working with un-blinded id suggesting blinded-id code is incorrect)
Updated the SOGS request/response types to use Codable
Updated the SOGS Request type to use enums instead of strings for keys (to reduce likelihood of typos breaking things)
Updated SessionMessagingKit to use Codable and JSONEncoder/JSONDecoder instead of the legacy JSONSerialization
Cleaned up some naming conventions in the SessionMessagingKit (calling a URLRequest body 'parameters' is very confusing...)
Removed the custom TSRequest class (just using standard URLRequest everywhere instead)
Added a number of extension functions to enable some more functional-coding styles
Added extensions to Sodium methods to allow scalar multiplication and the ability to hash providing a salt and a personalisation value (both needed for new SOGS auth)
Fixed an issue where the legacy auth for SOGS could crash due to threading issues (multiple threads accessing the same variable)
Fixed an issue where if you were in two rooms in a single SOGS and deleted one of them, the other room would stop getting updates as the server public key was getting removed
2022-02-10 11:17:41 +11:00
Morgan Pretty 394b0646a3 Updated the code to support additional session id prefixes 2022-02-08 16:37:01 +11:00
Ryan Zhao 2d9f962a97 Merge branch 'dev' of https://github.com/oxen-io/session-ios into voice-calls-2 2022-02-04 14:21:54 +11:00
Morgan Pretty 185b2d2a97 Merge branch 'dev' into feature/pdf-preview
# Conflicts:
#	Session/Conversations/ConversationVC+Interaction.swift
2022-02-04 11:51:51 +11:00
Morgan Pretty cd61fb8df0 Merge branch 'dev' into feature/message-requests
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	SignalUtilitiesKit/Utilities/UIColor+Extensions.swift
2022-02-04 11:49:54 +11:00
Morgan Pretty 9db5083cc5 Built out the Message Request functionality
Added the MessageRequestsViewController
Added a 'Message Requests' button to the settings screen
Added accept/reject buttons for message requests to the ConversationVC
Added the ability to hide the message request item on the HomeVC (re-appears if you get a new message request)
Added code to handle an edge-case where the message request approval state wouldn't be returned to the sender due to the recipient running an old version of the app
Prevented contacts which aren't associated with an approved thread from appearing when creating a closed group
Disabled notifications for threads which aren't approved
Updated the app notification count to exclude unapproved messages
Updated the app to ignore closed group creation messages if the group has no admins which are approved contacts
Fixed up the keyboard avoidance behaviour in the ConversationVC
Fixed a couple of minor interaction issues which affected some devices
Fixed an issue where the database migrations would run on the 2nd launch when creating a new account (causing odd behaviours)
2022-02-02 16:59:56 +11:00
Morgan Pretty b85c113da6 Added code to preview PDF attachments 2022-01-28 16:24:18 +11:00
Morgan Pretty dd9eeb5d61 Added initial support for sharing URLs and text
Updated the share extension to load URL previews.
Updated the ThreadPickerVC to send plain text & URLs in the same way they are sent for normal messages.
2022-01-12 09:40:53 +11:00
Morgan Pretty 4f3faa28bc Refactored SessionShareExtension code to Swift 2022-01-11 12:38:19 +11:00
Ryan Zhao 0df2630a70 enable CBR 2021-12-07 16:30:14 +11:00
Ryan Zhao f3206416e0 WIP: show missed call tips 2021-11-30 13:46:53 +11:00
Ryan Zhao 570c3fbe3b add ringtone and other UI improvement 2021-11-29 16:32:02 +11:00
Ryan Zhao 78971b7d09 ignore call messages over 60s 2021-11-25 16:50:30 +11:00
ryanzhao bcf0ecfb69 show modal of ip exposure for calls 2021-10-25 11:49:54 +11:00
ryanzhao 3de81ef2a0 imporvements 2021-10-14 16:01:50 +11:00
ryanzhao 9b9a5d7a39 improve vibration for incoming calls 2021-10-12 16:42:53 +11:00
ryanzhao ccbc819cc4 include more info in logs 2021-10-05 15:45:54 +11:00
ryanzhao fde5083de8 improve link preview images 2021-09-15 14:02:52 +10:00
Niels Andriesse 5202bde4a4 Supply fake User-Agent & Accept-Language headers 2021-07-09 15:07:39 +10:00
nielsandriesse c98cfe420d Fix spacing 2021-05-28 09:58:33 +10:00
nielsandriesse bf9d860214 Batch thread updates 2021-05-28 09:47:05 +10:00
Niels Andriesse 601062c9ef Fix timeSinceLastOpen usage 2021-05-24 16:39:18 +10:00
Brice-W 51ba97827d open group polling limit implementation 2021-05-24 16:00:42 +10:00
nielsandriesse e1ad33e832 Clean 2021-05-05 14:22:29 +10:00
Niels Andriesse d742fc1548 Delete V1 OGS & file server 2021-05-04 15:46:48 +10:00
Niels Andriesse f552d51423 Remove unused code 2021-05-04 15:06:41 +10:00
Niels Andriesse e9df213bfe Put feature flags in one place 2021-04-27 08:53:18 +10:00
nielsandriesse f7a75a1b80 Debug 2021-04-07 11:34:28 +10:00
nielsandriesse 75f5591fe0 Store certificates in DER format 2021-04-07 09:26:27 +10:00
Niels Andriesse 2687d9c968 Use proper API 2021-04-07 09:26:00 +10:00
Niels Andriesse 8d2e81ddde Trust only self-signed seed node certificates 2021-04-01 15:51:14 +11:00
Niels Andriesse edc4a7a71b Move files 2021-04-01 15:28:52 +11:00
Niels Andriesse 58748471a4 Set up skeleton code 2021-04-01 15:27:44 +11:00
Niels Andriesse d4b745a322 Cache open group preview images 2021-03-30 09:54:40 +11:00
Niels Andriesse 7558e0b32a Re-enable joining V1 open groups 2021-03-29 11:33:52 +11:00
Niels Andriesse 34bbff1ab4 Implement OpenGroupAPIV2 2021-03-24 10:54:38 +11:00
Niels Andriesse 1a09ee3619 Scroll to last unread message upon opening a conversation 2021-03-01 14:23:55 +11:00
Niels Andriesse 10e6d114a0 Sync profile updates 2021-02-23 16:01:06 +11:00
Niels Andriesse e4aca65af0 Clean 2021-02-23 14:20:21 +11:00
nielsandriesse 810aa42f03 Finish link preview UI 2021-02-15 13:51:26 +11:00
nielsandriesse 1924e01edc Merge branch 'multi-device' into ui 2021-02-10 11:27:39 +11:00
nielsandriesse 4803b96eb1 Only handle the first config sync message after restoration 2021-02-10 10:19:46 +11:00
Niels Andriesse 90e53e5cef Redesign conversation screen part 1 2021-02-09 15:14:18 +11:00
Niels Andriesse 7acb6c9ac3 Merge branch 'dev' into multi-device 2021-01-28 15:44:04 +11:00
Niels Andriesse 54e902c848 Fix various warnings 2021-01-28 15:40:45 +11:00
Niels Andriesse be877bbeaf Improve onion request path loading efficiency 2021-01-27 16:14:35 +11:00
Niels Andriesse e38aaa4e0e Merge branch 'closed-groups' into multi-device 2021-01-27 10:16:17 +11:00
Niels Andriesse cf333d5e3d Merge branch 'closed-groups' into multi-device 2021-01-25 13:50:18 +11:00
Niels Andriesse bbac6cc5ed Attempt to fix extensions 2021-01-25 10:28:33 +11:00
nielsandriesse 9eefc21eb9 Periodically send configuration messages 2021-01-13 14:08:41 +11:00
nielsandriesse d6314c8d30 Handle configuration messages 2021-01-13 13:38:07 +11:00
nielsandriesse 28e3705f7e Implement multi device UI 2021-01-13 10:52:07 +11:00
Niels Andriesse 0d01480cd0 Debug 2021-01-07 16:40:01 +11:00
Niels Andriesse 6e673945c5 Re-organize files 2020-12-18 15:37:29 +11:00
Niels Andriesse 61a0672824 Merge branch 'dev' into link-previews 2020-12-18 11:57:11 +11:00
Niels Andriesse 7583661cca Implement auto-migration 2020-12-16 16:22:46 +11:00
Niels Andriesse a46e9e3eb5 Recommend that users migrate 2020-12-14 10:20:10 +11:00
Niels Andriesse 2a4977d269 Implement Session protocol 2020-12-14 09:49:02 +11:00
Niels Andriesse 905b829de2 Refresh snode pool at least once a day 2020-12-07 09:29:46 +11:00
nielsandriesse d6c115bc2a Fix module linking issue 2020-12-02 16:25:16 +11:00
nielsandriesse 5f2ec37db7 Fix message duplication bug 2020-12-01 11:40:37 +11:00
Niels Andriesse ac6baec6f2 Make things compile again 2020-11-26 10:37:56 +11:00
nielsandriesse 1037ce5113 WIP 2020-11-25 16:21:04 +11:00
nielsandriesse 5dfd4b1965 Restructure 2020-11-25 16:15:16 +11:00
Niels Andriesse d7c71a8c06 Make things compile again 2020-11-23 10:24:40 +11:00
nielsandriesse b218a16b05 Implement attachment downloading 2020-11-20 15:53:56 +11:00
Niels Andriesse a48fc40aa6 WIP 2020-11-19 15:35:43 +11:00
nielsandriesse f36f447bec Ditch unused Signal code 2020-11-17 15:35:52 +11:00
nielsandriesse 1c0b32af3c Fix ECKeyPair usage 2020-11-12 10:41:45 +11:00
nielsandriesse 000e907d47 Clean up Podfile 2020-11-12 07:55:24 +11:00
nielsandriesse c475f895e8 Create SignalUtilitiesKit 2020-11-11 10:58:56 +11:00
nielsandriesse 82127bfe4d Clean 2020-11-10 15:48:47 +11:00
nielsandriesse 362e2e9c03 Update SessionMessagingKit for open groups 2020-11-09 11:53:07 +11:00
nielsandriesse a3382f41d4 Re-organize files 2020-11-09 10:58:47 +11:00