* Add sendStory method for posting file attachment stories to My Story
Adds Manager.sendStory(attachment, allowsReplies), which uploads a file
attachment, builds a SignalServiceStoryMessage, and sends it to all
registered, non-blocked, non-hidden contacts that haven't opted out of
seeing the user's story (Contact.hideStory), excluding self. SendHelper
gains sendStoryMessage(), which resolves recipient addresses and
unidentified access and delegates to
SignalServiceMessageSender.sendGroupStory() against
DistributionId.MY_STORY, following the same address/access resolution
pattern used for group sends. A sync transcript is sent afterwards via
sendStorySyncMessage() so linked devices see the story was posted.
This is core library plumbing only; no CLI command, stub
implementations, or documentation are added yet.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MR2KF56Qcf9qNH1URj3XWs
* Add sendStory command for posting stories via CLI and JSON-RPC
Implements SendStoryCommand to allow users to post stories through the
CLI and JSON-RPC interfaces. Command accepts an attachment file path
(required) and optional --no-replies flag to disable replies on the story.
Handles AttachmentInvalidException and IOException appropriately and
outputs results using SendMessageResultUtils.
Registered in Commands.java in alphabetical order.
* Add sendStory stubs to DbusManagerImpl and StubManager
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MR2KF56Qcf9qNH1URj3XWs
* Document sendStory in man page and changelog
* Validate story attachment MIME type and fix D-Bus stub
- Reject non-image/video attachments before uploading, since stories
only support image and video content
- Change DbusManagerImpl.sendStory to throw UnsupportedOperationException
to match the pattern used by all other unimplemented D-Bus methods
* Resolve recipients before uploading story attachment
Move recipient resolution ahead of the attachment upload so that an
empty contact list is caught early without wasting bandwidth on an
upload that would reach nobody.
* Address review feedback: fix hideStory filter and remove redundant sync
- Fix hideStory filter to require contact exists (!=null &&) instead of
permitting null contacts (==null ||), matching the intent of filtering
to contacts who haven't hidden stories
- Remove manual sendStorySyncMessage call, as the library's sendStory
already handles sync internally
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HHzM2XLKQoX9iraEdhoh3h
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Add distinct JSON-RPC error code for captcha rejection
Previously submitRateLimitChallenge mapped CaptchaRejectedException to
the generic USER_ERROR code (-1), making it indistinguishable from any
other user error (bad params, unknown command, etc.).
Introduce CaptchaRejectedErrorException and wire it to a new error code
(-6 / CAPTCHA_REJECTED_ERROR) throughout the JSON-RPC layer. Callers can
now reliably distinguish a rejected captcha token (user must obtain a
fresh token) from a network failure (transient, worth retrying) or a
generic argument error.
The CLI exit code for this path becomes 6, consistent with the existing
per-error-type exit code convention.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add exit code 6 to man page
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Implement two new CLI flags to disable downloading avatars and sticker
packs during message reception, following the existing pattern of
--ignore-attachments and --ignore-stories flags.
Changes:
- Add --ignore-avatars and --ignore-stickers flags to ReceiveCommand,
DaemonCommand, and JsonRpcDispatcherCommand
- Extend ReceiveConfig record with ignoreAvatars and ignoreStickers
fields
- Pass ignoreAvatars as explicit boolean parameter to ProfileHelper,
SyncHelper, and GroupHelper methods (per maintainer feedback)
- Gate avatar downloads in ProfileHelper (profile avatars), SyncHelper
(contact avatars), and GroupHelper (group avatars for V1 and V2)
- Gate sticker pack downloads in IncomingMessageHandler for both
direct sticker messages and sync sticker pack operations
- Update handleSignalServiceDataMessage and handleSyncMessage to pass
full ReceiveConfig instead of individual boolean flags
- Update man page (signal-cli.1.adoc) with flag documentation
- Add entries to CHANGELOG.md
When these flags are set, the respective content is not downloaded
during message reception. Metadata (avatar paths, sticker pack IDs)
is still stored, and existing FileNotFoundException handling will
surface if content is later requested but wasn't downloaded.
Fixes#1903Closes#1904
The unit of UTF-16 code units is not necessarily obvious for users of
languages that index strings by Unicode code points. Provide a pointer
to an FAQ entry as well:
https://github.com/AsamK/signal-cli/wiki/FAQ#string-indexing-unitsCloses#1504
Signed-off-by: Stephen Brennan <stephen@brennan.io>