Signal-iOS/SignalServiceKit
George Nachman 451fa08c22 Optimize searching for verification status.
When opening a group chat we check if all
participants are verified (which confers to the
chat verified status and a "✓ Verified" label in
the header) and we also check if any participants
have the "no longer verified" status so we can
warn you about potential misdeeds.

Previously, this was done by performing a select
statement for each participant twice (once for
"are all verified" and again for "is any
no-longer-verified").

This change uses a join in a select statement
instead to reduce the number of queries performed.

Given existing indexes in the DB this can be done
efficiently. Adding additional indexes does not
seem to help - or at least I wasn't able to get
sqlite to use them.

Since most chats are not verified, we use a LIMIT
clause when possible to allow the DB to stop
early, which should make queries even cheaper.
2022-02-18 12:32:58 -08:00
..
protobuf Ignore messages with StoryContext 2022-01-26 10:28:52 -08:00
Resources Add support for new certificate authority 2022-01-26 12:59:45 -06:00
src Optimize searching for verification status. 2022-02-18 12:32:58 -08:00
tests Fix MessageProcessingIntegrationTest database expectations 2022-02-03 09:44:11 -08:00
Utilities Convert to just using CocoaPods for dependencies 2020-01-02 12:03:57 -08:00
.clang-format
.gitignore
.travis.yml
CONTRIBUTING.md Update URL in documentation 2021-08-24 22:46:06 -05:00
LICENSE
README.md Convert to just using CocoaPods for dependencies 2020-01-02 12:03:57 -08:00

SignalServiceKit

SignalServiceKit is an Objective-C library for communicating with the Signal messaging service for iOS & OS X

To use SignalServiceKit via CocoaPods add the following to your Podfile

pod 'SignalServiceKit', git: 'https://github.com/signalapp/Signal-iOS.git'