Commit Graph

180 Commits

Author SHA1 Message Date
Sasha Weiss
056fb3a115
Add CallRecordQuerier 2024-01-03 11:11:35 -08:00
Harry
5da3a3a498
Stop using TSIncomingMessage.sourceDeviceId 2023-12-19 11:16:26 -08:00
Harry
0c53ff88fa
Rename TSOutgoingMessage.isFromLinkedDevice->wasNotCreatedLocally 2023-12-15 09:36:46 -08:00
Sasha Weiss
b954d87562
Update CallRecord state in response to ring updates 2023-12-11 15:02:25 -08:00
Sasha Weiss
7acc370f67
Suppress 409 errors on receipt credentials for very specific cases 2023-11-14 10:02:46 -08:00
Sasha Weiss
30680635f8
Prevent donation-complete sheets from popping on subscription renewal 2023-11-09 15:26:46 -08:00
Sasha Weiss
7f41ecaa8b
Support SEPA bank transfer donations 2023-11-06 13:49:40 -08:00
Sasha Weiss
7b4674eae4
Add timestamp to CallRecord 2023-10-17 12:11:49 -07:00
Sasha Weiss
c88a283166
Restructure CallRecord's UNIQUE constraints 2023-10-13 14:54:16 -07:00
Sasha Weiss
d5848b7dd4
Restructure CallRecord in preparation of group call disposition 2023-10-12 14:44:40 -07:00
Max Radermacher
0935c7e70e
Add PNI column to SignalRecipient 2023-09-06 17:31:16 -05:00
Harry
ecbb1057c9
[MOB] Payments activation request in chat 2023-08-24 15:38:13 -07:00
Harry
2ac759408a
[MOB] Payment messages in chat 2023-08-24 13:55:39 -07:00
Pete Walters
05b5391dc9
Mark unread revisions as read via Edit History 2023-08-14 15:59:54 -05:00
Marissa Le Coz
52bf8a41fc
React to remote changes of hidden recipient state 2023-07-19 19:25:54 -04:00
Pete Walters
82e51fe9cd
Add support for saving edit message drafts. 2023-07-07 15:38:35 -05:00
Pete Walters
9b235845ed
Update how edits are expired & deleted 2023-06-02 16:15:46 -05:00
Pete Walters
b91865f358
Fix unread behavior with edits 2023-06-02 13:58:30 -05:00
Pete Walters
cf37a8b1f9
Edit Message DB changes & conversation edit filtering 2023-05-03 17:22:10 -05:00
Max Radermacher
31f2f3d681
Improve MSL performance 2023-04-25 14:13:59 -07:00
Max Radermacher
0d8ef0f17e
Improve FailedAttachmentDownloadsJob perf 2023-04-25 12:22:20 -07:00
Harry
b6c6d60141
Fix long query for story replies 2023-04-18 13:08:03 -07:00
Sasha Weiss
5d7241d038
Add parsing support for the pni capability 2023-03-24 10:07:39 -07:00
Max Radermacher
135074b570 Verify IAS certificates using LibSignalClient 2023-02-10 10:23:50 -08:00
Sasha Weiss
e5f1af6c2e
Support lookup-by-username 2023-02-08 10:16:57 -08:00
george-signal
5fe81c0ad3
Show video duratioin in All Media. 2023-02-03 16:00:46 -08:00
Evan Hahn
8d707a9c74
Add spam reporting tokens 2023-01-25 14:14:57 -06:00
Max Radermacher
0dc492fec5
Use common logic when creating web sockets 2023-01-24 14:01:34 -08:00
Evan Hahn
6e97ff3c8f
Gifting: add PayPal support 2023-01-18 16:38:57 -06:00
Harry
b3136fb42c
Call Disposition
* 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
2023-01-10 11:48:46 -08:00
Max Radermacher
921301cdb0
Add CDSv2 2022-12-14 16:30:35 -08:00
Sasha Weiss
ee4799b506 One-time donations via PayPal 2022-12-01 14:39:03 -08:00
Max Radermacher
0606340fc5
Remove old CA certificate 2022-11-30 14:31:25 -08:00
Jordan Rose
a87651e7ed Handle incoming group call rings
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.
2022-11-07 09:48:53 -08:00
Sasha Weiss
c7dd7f4c84
Actions for donation megaphone 2022-11-03 11:39:37 -07:00
Max Radermacher
9db9d94085
Handle isComplete during incoming contact syncs 2022-10-19 09:29:52 -07:00
Harry
201f002499
Add lastReadTimestamp to StoryContextAssociatedData
* 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
2022-10-18 11:18:06 -07:00
Sasha Weiss
151e8b8044
Migrate from ExperienceUpgradeId to ExperienceUpgradeManifest (#5163) 2022-10-17 09:55:12 -07:00
Harry
74228f424e
Add StoryContextAssociatedData to compute story tab badge count without hidden stories
* 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
2022-10-03 21:16:01 -07:00
Harry Sanabria
ad65ef501f Add lastReceivedStoryTimestamp to schema.sql 2022-09-22 17:05:06 -07:00
Nora Trapp
9776699137 Sync when contacts become unregistered 2022-09-15 14:09:03 -07:00
Harry
de198f118b
Add story hidden state to ThreadAssociatedData
* Add story hidden state to ThreadAssociatedData

* make hideStory column non-null
2022-09-02 12:03:50 -07:00
Sasha Weiss
569cdb2aad
Durable jobs for leaving groups 2022-08-26 13:13:23 -07:00
Nora Trapp
89076ed822 Fix stories tab badging 2022-08-20 15:01:03 -07:00
Nora Trapp
1d9a8a8995 Add lastViewedStoryTimestamp to TSThread 2022-08-15 14:15:11 -07:00
Nora Trapp
edc5c7beae Fix schema.sql for 2022-08-08 14:34:51 -07:00
harry-signal
741c3961bd
Add audioPlaybackRate thread-level metadata to ThreadAssociatedData table 2022-08-01 15:34:40 -07:00
Evan Hahn
64462ac1b0 Save a receipt when you send someone a badge
This commit:

1. Adds a new donation receipt type: gifts.
2. Saves receipts when sending someone a gift.

The first part was the main challenge. Previously, donation receipts had
logic like this (pseudocode):

     def getReceiptType(self):
       if self.subscriptionLevel:
         return "subscription"
       else:
         return "one-time"

Now, we explicitly encode the type and have logic to handle "legacy"
receipts that don't have a type encoded.
2022-07-08 13:17:30 -05:00
Evan Hahn
f5556d1857
Use durable job for sending badge gifts
Previously, sending a gift badge was not a durable operation, which
meant that crashes/failures could cause users to have their payment
methods charged without actually sending the badge.

Now, the flow is split up into two steps: non-durable parts before the
charge is attempted, and durable parts afterward.

The high-level flow is:

1. Prepare the payment, which involves a couple of repeatable network
   requests.
2. Enqueue a job with the prepared payment, that:
   1. Charges the payment method (idempotently)
   2. Requests a receipt credential (idempotently)
   3. Enqueues a gift message, and optionally a text message
3. When the job completes, open the conversation in the UI.
2022-07-01 17:10:31 -05:00
Nora Trapp
7bd167f815
Initial story sending support
* Little fix for context menu

* Add 'My Stories' section to stories tab

* Add new story thread types

* Show stories in conversation picker

* Support for sending stories

* Update story list when sending stories

* Add basic 'My Stories' view controller

* Initial stories settings screens

* Consolidate TSPrivateStoryThread and TSMyStoryThread into one class

* Require an explicit read transaction to initialize an outgoing message

* Fix linting

* Allow enabling group story from internal settings

* Fix tests

* PR Feedback
2022-06-10 22:28:03 -04:00