Signal-iOS/SignalServiceKit
Max Radermacher 39d85c255a
Persist updates as part of fetch profile promise
As far back as 823927685d, the profile
updates were asynchronous. At that point it time, it didn’t matter
because there wasn’t a completion block; callers couldn’t know when the
updates *should* be complete, so it didn’t matter when they finished.

However, in 856fef7664 a Promise result
was added, presumably to allow callers to know when it was safe to check
GV2 capabilities. Now, a cursory reading of the API would suggest that
all changes were persisted once the Promise was resolved.

This can result in bugs, such as [this example][0], where we fetch the
profile and then check a capability in the database. Even though it’ll
*probably* be the case, there’s no guarantee that the updated profile
will be persisted when we try to fetch the latest capability.

[0]: 465d00664b/Signal/src/ViewControllers/AppSettings/Donations/BadgeGiftingConfirmationViewController.swift (L69-L88)
2022-10-27 19:54:24 -07:00
..
Experience Upgrades Wire up the remote megaphone model to a view 2022-10-26 17:56:14 -07:00
protobuf Move system contact names to ContactRecord 2022-10-26 15:00:36 -07:00
Resources Handle isComplete during incoming contact syncs 2022-10-19 09:29:52 -07:00
src Persist updates as part of fetch profile promise 2022-10-27 19:54:24 -07:00
tests Add FiatMoney type 2022-10-26 17:04:51 -05:00
.clang-format Update clang-format with AllowShortEnumsOnASingleLine: false 2022-03-14 11:20:20 -07:00
.gitignore
.travis.yml
SignalServiceKit-Prefix.pch Change license to AGPL 2022-10-13 08:25:37 -05:00
SignalServiceKit.h Change license to AGPL 2022-10-13 08:25:37 -05:00