Commit Graph

4295 Commits

Author SHA1 Message Date
Jordan Rose
904bb36d7f Turn group data caches back on in the NSE
Without the GroupV2Params caches, processing multiple large group
updates is extremely wasteful, decrypting the same profile keys and
UUIDs over and over again. The size of these caches has also been
*increased* to match the group size limit, or else there's no benefit
for large groups.

Other LRUCache instances are still off by default in the NSE by virtue
of the "NSE max" defaulting to 0.
2022-01-20 16:49:37 -08:00
Jordan Rose
0edd86f3f7 Improve cache keys for group member profiles, UUIDs, and blobs
When Data is put into an NSCache it gets converted to an NSData, which
is a CFData underneath. CFData's hash function only looks at a prefix
of the data, and the secret params were taking up a good chunk of that
prefix, leading to hash collisions. By putting more variable data
first, we get better hashes *and* exit memcmp faster in the case of a
collision.
2022-01-20 16:08:34 -08:00
Jordan Rose
58a688ad61 Lazily deserialize individual group changes
If there are several group changes being returned at once,
deserializing all of them up front can lead to excessive memory use,
especially for very large groups. This commit switches to
deserializing each change as it is used, which doubles the amount of
CPU work (because we loop through the changes twice) in exchange for
only ever having one Change object graph in memory at a time. It does
also mean we can get a protobuf deserialization error a bit later in
the process if the data is ever corrupted, but that shouldn't cause
additional issues at these particular call sites.
2022-01-20 12:00:50 -08:00
Jordan Rose
82becbdefc Always try to clean up storage service records with unknown fields
Previously we would only do this if we could handle *all* unknown
fields, but these days we sometimes have more than one unknown field
and learn about one at a time.
2022-01-07 13:55:47 -08:00
Martin Böttcher
497ac2ab39 Merge branch 'master' into martin/IOS-2051 2022-01-05 10:52:15 +01:00
Jordan Rose
390119b54d Sync preferred reactions through storage service 2022-01-03 15:35:37 -08:00
Nora Trapp
db115606e3 Remove ZKGroup 2022-01-03 12:00:19 -08:00
Nora Trapp
29366b0074 Merge branch 'release/5.26.9' 2022-01-03 11:01:53 -08:00
Nora Trapp
c81dfcdb0d Stripe uses american spelling of 'canceled' 2022-01-03 10:55:49 -08:00
Nora Trapp
877b9ced6e Fix forced unwraps in SubscriptionManager 2022-01-03 10:28:44 -08:00
Martin Böttcher
f141adfe3b added animations and changed multi selection handling when in archive mode 2021-12-27 11:09:00 +01:00
Jordan Rose
38fbb3bbc2 Copy in AFNetworking's query string encoding implementation
Matthew previously stripped this down in our fork of AFNetworking; at
this point there's no benefit to it living in a separate repo and
separate target. With this we can remove the AFNetworking target
completely.
2021-12-17 14:52:59 -08:00
Jordan Rose
d1e52563c0 SSK: Replace AFSecurityPolicy with OWSHTTPSecurityPolicy
OWSHTTPSecurityPolicy was originally a subclass of AFSecurityPolicy
specifically for use with Signal-run services, but it already contains
the part of AFSecurityPolicy that we use elsewhere.
2021-12-17 14:40:25 -08:00
Nora Trapp
f2c09045ca Sync additional badge info with storage service 2021-12-17 14:07:40 -08:00
Nora Trapp
8da582715f Fix badge expiry 2021-12-17 14:04:42 -08:00
Eugene Bistolas
4f1b8b6002 [Badging] Expiry state incorrectly forward carried 2021-12-17 14:01:02 -08:00
Eugene Bistolas
349479d328 [Badging] Last expiring badge is not invalidated when expected 2021-12-17 14:00:56 -08:00
Eugene Bistolas
7682ad23f6 [Badging] Subscription badge expiry UI 2021-12-17 13:59:38 -08:00
Eugene Bistolas
5dd35ae9f8 [Badging] Signal devices when subscription status changes 2021-12-17 13:58:47 -08:00
Eugene Bistolas
93a59cb0f2 [Badging] Determine if user has current subscription via cached data 2021-12-17 13:58:39 -08:00
Nora Trapp
9ed5e74b79 Sync additional badge info with storage service 2021-12-17 13:54:20 -08:00
Nora Trapp
64b399f3e3 Fix badge expiry 2021-12-17 13:54:20 -08:00
Eugene Bistolas
5ea5091e1c [Badging] Expiry state incorrectly forward carried 2021-12-10 15:52:38 -10:00
Eugene Bistolas
64ed35a2b9 [Badging] Last expiring badge is not invalidated when expected 2021-12-10 09:34:32 -10:00
Nora Trapp
1943c1e765 Merge branch 'release/5.26.5' 2021-12-07 16:17:42 -08:00
Nora Trapp
5917973c79 Fix regression resulting in rendering system contact avatars for the local user 2021-12-07 16:13:39 -08:00
Michelle Linington
8a19b8ed34 Merge branch 'release/5.26.4' 2021-12-06 13:06:06 -08:00
Michelle Linington
3d695404ab VisibleBadgeIds is now nonnull on PendingProfileUpdate
A nil array would clear badges anyway. This makes things a bit more
explicit. Also improves some logging.
2021-12-06 12:06:19 -08:00
Michelle Linington
445d30524f Fixes a typo in PendingProfileUpdate decoding 2021-12-06 12:06:19 -08:00
Eugene Bistolas
7bdb0f6a8b [Badging] Subscription badge expiry UI 2021-12-03 12:47:02 -10:00
Eugene Bistolas
61989e9363 [Badging] Signal devices when subscription status changes 2021-12-02 21:04:47 -10:00
Martin Böttcher
7ebf46b3e8 fixed some lint issues and modified some UI details due to updated and specified requirements 2021-12-02 20:36:23 +01:00
Martin Böttcher
a3876232d5 PAPERCUT-475: added swipe action to HomeView allowing muting/unmuting thread 2021-12-02 20:36:23 +01:00
Nora Trapp
3471ddf278 Merge branch 'release/5.26.3' 2021-11-30 13:14:24 -08:00
Nora Trapp
47423fbed0 Allow payments to be enabled if it was previously enabled remotely 2021-11-30 12:54:24 -08:00
Nora Trapp
cbd424636e Always preserve payments entropy when setting state 2021-11-30 12:53:51 -08:00
Eugene Bistolas
8725fc731f [Badging] Determine if user has current subscription via cached data 2021-11-30 10:19:31 -10:00
Eugene Bistolas
953070c447 Merge branch 'release/5.26.3' 2021-11-29 13:22:23 -10:00
Eugene Bistolas
07610dbe96 [Badging] Ensure client does not reredeem badge receipts unnecessairly 2021-11-29 11:35:29 -10:00
Nora Trapp
0c8e6a087b Add support for donations with Maestro cards 2021-11-29 11:35:17 -10:00
Eugene Bistolas
b41cbca9e8 [Badging] Cancel and re-initiate subscription if level is upgraded under payment failure 2021-11-29 11:34:57 -10:00
Nora Trapp
41563ba045 Add support for donations with Maestro cards 2021-11-29 11:32:16 -08:00
Matthew Chen
9a16be2c98 Merge branch 'release/5.26.2'
# Conflicts:
#	Signal/Signal-Info.plist
#	SignalNSE/Info.plist
#	SignalShareExtension/Info.plist
2021-11-24 18:41:49 -03:00
Nora Trapp
2a80d51188 Fix home view dates 2021-11-23 17:44:55 -08:00
Eugene Bistolas
5126de3412 Merge branch 'release/5.26.1' 2021-11-23 14:52:06 -10:00
Eugene Bistolas
aadf5c137d [Badging] Remove receipt emails from subscription/boosts 2021-11-23 14:47:25 -10:00
Eugene Bistolas
ddafbd32ff Merge branch 'release/5.26.1' 2021-11-23 11:57:03 -10:00
Eugene Bistolas
a9a30e4959 [Badging] redemption failure feedback 2021-11-23 11:32:48 -10:00
Eugene Bistolas
7d4310cd36 [Badging] Better handling of durable job HTTP failures 2021-11-23 11:23:41 -10:00
Eugene Bistolas
a3e625e0a8 [Badging] Handle incomplete state from Stripe per server spec 2021-11-23 09:51:47 -10:00