* Add CallEvent sync message proto
* Add CallRecord class and db table
* Renames and comments for clarity
* create and update CallRecord from local device call events
* Handle incoming call event sync messages
* Add outgoing call sync event piping
* Send call event sync messages
* Handle call record sync messages before the app is launched
* Mark TSCall interactions as read and update their status when getting call event sync messages
* Prevent CallKit race conditions by checking state before creating TSCall interactions
* Update chat call event text for unanswered and declined calls
* Remove incorrect debug assert which fires every time a call is missed in the background
* PR comments, mostly nits
* convert old debug assert into a log + task comment
* nit
* Update copy for in chat call logs
* Smaller PR comments
* Add foreign key to CallRecord's interactionUniqueId
* Update write transaction ordering comment
* run genstrings
* fix strings
This adds a table of "cancelled group rings", to handle out-of-order
delivery between a cancellation and a ring. (This can happen when the
cancellation comes from a linked device rather than the original
ringer, though it's very unlikely.) Thirty-minute-old cancellations
are cleared lazily.
This also adds a new IncomingCallControls to replace the usual
CallControls in a GroupCallViewController.
And finally, there's a lot of code that was 1:1-call-specific that now
handles group calls as well, either by being more general or by
checking which kind of call we have.
* Add last read timestamp to StoryContextAssociatedData
* Write lastReadTimestamp on StoryContextAssociatedData
* Copy lastViewedTimestamp over to lastReadTimestamp to simplify badge query
* apply didSets for data that changed at rest
* Add StoryContextAssociatedData and db migrations
* Remove hideStory from ThreadAssociatedData
* Remove lastViewedStoryTimestamp and lastReceivedStoryTimestamp from TSThread
* drop deprecated columns in db migration
* add indexes
* dump schema.sql
* Update unviewed stories SQL query
* fix thread fetching for incoming story messages
* reload story tab badge when StoryContextAssociatedData changes
* Add test for TSGroupModel backwards-compatible deserialization
* move db migration
* Only use StoryContextAssociatedData for story badge count
* update StoryContextAssociatedData lastReceivedTime when a story message is deleted
* catch group threads for outgoing story messages too
* clean up sql query
* Only update lastReceievedStoryTimestamp for remote deletions
* add latestUnexpiredTimestamp to StoryContextAssociatedData