Skip to content

Sticker packs installed on the phone are in the picker on a freshly linked device - #1044

Closed
unRekable wants to merge 1 commit into
mainfrom
fix/read-installed-sticker-packs
Closed

unRekable wants to merge 1 commit into
mainfrom
fix/read-installed-sticker-packs

Conversation

@unRekable

Copy link
Copy Markdown
Collaborator

What changed and why

Showing, sending and installing Signal sticker packs works. Installed packs were not read from the storage service, so a freshly linked device started with an empty picker (#744). The adapter now reads the sticker pack records the storage service holds: the manifest's identifiers of that type are fetched and opened beside the other records, a pack's id and key go into the list of installed packs, and a record that marks a pack removed takes it out. Each pack's manifest is fetched once, as for any install.

The library this tree reads the storage service through (presage) drops the sticker pack field when it decodes an item, so these items are opened here. A test seals an item with the library's own StorageService::encrypt_item and checks that it opens to the same record, on an account with a manifest key and on one without.

Type

  • feature
  • fix
  • perf
  • refactor
  • chore
  • docs

Platforms

  • windows
  • macos
  • linux
  • android
  • ios

Proof

Scenario: e2e/scenarios/signal-sticker-packs-from-storage

The scenario starts this build's chatd on Signal's scripted wire, steers it the way crates/chatd/tests/signal.rs does, and speaks chatd's socket. The storage file the scripted wire reads as the account's storage service names one pack this device never heard a sync message about. The picker's Stickers catalog must list that pack's two stickers, fetched as for any install, and a later storage read that marks the pack removed must empty the catalog. A build from before the change lists no sticker at all, so this driver fails there.

Lab run: not made. The driver was not run against the real chatd on a lab host.

Not shown: the request to the real storage service (/v1/storage/auth and /v1/storage/read) and the record's field numbers. Nothing ran against a Signal account. What is tested is the opening of an item the library sealed, and the way from the storage file to the picker.

Also run on this branch on Windows before this pull request: cargo build --workspace --all-targets --features tinyclient/gui, then cargo nextest run --workspace --features tinyclient/gui: 3680 of 3681 passed in the full run. adapters::tiny::e2ee::repair::tests::imported_modern_cache_validates_without_old_private_groups_and_survives_capability_loss failed there and passed alone at once. This change does not touch it, and it failed the same way on main: it names its directory after the process id and never removes it. 28 skipped. Then cargo test --workspace --doc --features tinyclient/gui.

Compatibility

No protocol change. One more read of the storage service per sync, for the sticker pack records only, and its answer is bounded at 256 KB.

Risk and rollback

The record's shape is taken from Signal's protocol (pack id, pack key, position, removed at). If it is read wrong, a pack shows with a key that fetches nothing, and nothing else changes. Revert the commit.

Release note

Sticker packs installed on the phone are in the picker on a freshly linked device.

Part of #744. Left: a signal.art/addstickers link in a message opens no preview with an Install button.

@itz4blitz

Copy link
Copy Markdown
Collaborator

Shipped in the 0.2.94 release via #1046.

@itz4blitz itz4blitz closed this Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants