112 Commits

Author SHA1 Message Date
Stefan Meinecke
d2639d10c0 Tie unauthenticated WebSocket keep-alive to active client connections
Keep the unidentified socket alive while a JSON-RPC connection is open (including stdio mode) and while a D-Bus object is exported, instead of for the lifetime of the receive loop. The receive loop does not use the unauthenticated socket, so keeping it alive there was semantically wrong.

This also covers --receive-mode=manual, where no receive loop runs butclients still send messages.
2026-06-16 20:28:38 +00:00
AsamK
4a3d9d90a6 Update libsignal-service 2026-05-13 18:25:35 +02:00
AsamK
7a8a34f45e Some call refactoring 2026-04-01 22:47:54 +02:00
Shaheen Gandhi
135d3a1677
Add voice calling support (#1932)
* Add voice call API types, protobuf definitions, and build dependencies

Define call method interfaces in Manager, create API records (CallInfo,
CallOffer, TurnServer), and hand-coded protobuf parsers for RingRTC
signaling messages (ConnectionParametersV4, RtpDataMessage).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Implement call signaling state machine and message routing

Add CallSignalingHelper for x25519 key generation and HKDF-based SRTP
key derivation. Add CallManager for tracking active calls, spawning
call tunnel subprocesses, and handling call lifecycle (offer, answer,
ICE candidates, hangup, busy). Wire call message routing in
IncomingMessageHandler and implement Manager call methods in ManagerImpl.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add call state notification mechanism for JSON-RPC clients

Implement CallEventListener callback pattern that fires on every call
state transition (RINGING_INCOMING, RINGING_OUTGOING, CONNECTING,
CONNECTED, ENDED). The JSON-RPC layer auto-subscribes and pushes
callEvent notifications alongside receive notifications.

Changes:
- Manager.java: Add CallEventListener interface and methods
- ManagerImpl.java: Implement add/removeCallEventListener with cleanup
- DbusManagerImpl.java: Add stub implementation (not supported over DBus)
- JsonCallEvent.java: JSON notification record for call events
- SignalJsonRpcDispatcherHandler.java: Auto-subscribe call event listeners

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Add JSON-RPC commands for voice call control

Add startCall, acceptCall, hangupCall, rejectCall, and listCalls
commands for the JSON-RPC daemon interface. Register commands and
update GraalVM metadata for native image support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add call tunnel documentation

Add documentation about the architecture, protocol, and implementation of
signal-call-tunnel, the secure tunnel subprocess for voice calling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove unused integration test tag from lib/build.gradle.kts

The excludeTags("integration") block was added but no tests use the
@Tag("integration") annotation. Revert to upstream's simple
useJUnitPlatform() call.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Derive install dir from jar location instead of nonexistent property

The signal.cli.install.dir system property was never set by the Gradle
start script or anywhere else. Replace it with code source detection:
resolve the jar's parent directory to find the install root, then look
for bin/signal-call-tunnel relative to that.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Remove explicit success responses from hangup and reject commands

Successful commands with no additional information should not return
a response, matching the pattern used by other signal-cli commands
like SendSyncRequestCommand and UpdateConfigurationCommand.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Use instanceof pattern matching for call ID extraction

Replace explicit null check and Number cast with instanceof pattern
matching in AcceptCallCommand, HangupCallCommand, and
RejectCallCommand.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Guard handleIncoming* methods against missing call event listeners

Skip processing incoming call offers when no call event listeners are
registered, since there is nobody to notify about the call. For hangup
and busy, also guard when there are no listeners AND no active call
(the tunnel may still need cleanup if already spawned).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Use Jackson JSON serialization in CallManager

Replace all manual JSON string concatenation with Jackson ObjectNode
construction and ObjectMapper serialization. Use BigInteger for call
IDs to properly represent unsigned 64-bit values in JSON.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add subscribeCallEvents command for opt-in call event notifications

Call events are no longer subscribed by default. JSON-RPC clients must
explicitly call subscribeCallEvents to receive callEvent notifications
and enable incoming call handling. This avoids sending unwanted call
events to clients that don't use voice calling.

Also adds unsubscribeCallEvents for cleanup, idempotent subscription
guard, and updates CALL_TUNNEL.md to document the subscription step.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Replace Unix socket with stdin/stdout for tunnel communication

Use the tunnel subprocess' stdin for sending control messages and
stdout for receiving control events, instead of a separate Unix
domain socket. This eliminates:
- Temporary directory creation (/tmp/sc-<random>/)
- Socket path and auth token in config JSON
- Connection retry loop (50x at 200ms)
- Auth message handshake
- Socket cleanup on call end

The tunnel's stderr is captured separately for logging. Config JSON
is written as the first line on stdin, followed by control messages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 22:07:16 +02:00
AsamK
7014f629fe Show member labels in listGroups command 2026-03-08 11:55:19 +01:00
AsamK
aa1ed9e233 Add support for sending adminDelete messages 2026-02-28 11:59:31 +01:00
AsamK
3b6c199b1d Add pinMessage and unpinMessage commands
Closes #1923
2026-02-28 11:50:44 +01:00
AsamK
6d22ceef24 Support receiving admin delete messages 2026-02-28 11:30:33 +01:00
AsamK
6a6bebd503 Add support for receiving pin/unpin messages
Related #1923
2026-02-28 09:37:29 +01:00
AsamK
8eb9662694 Implement new updateDevice command to update device names
Fixes #1906
2026-01-23 20:00:25 +01:00
AsamK
eb52380ecf Remove now unnecessary check for primary device from updateContact
Fixes #1880
2025-12-08 17:08:38 +01:00
AsamK
feaee2bfe1 Add support for receiving and sending polls 2025-11-02 20:50:18 +01:00
AsamK
d27aea2220 Add --notiy-self to sendReaction command 2025-11-02 18:49:26 +01:00
AsamK
a22af8303a Force a group refresh when using listGroups command with groupId
Fixes #1802
2025-09-14 19:28:56 +02:00
AsamK
5e16123632 Extend updateContact command with nick given/family name and note 2025-01-23 17:11:33 +01:00
AsamK
f2005593ec Reformat files 2024-11-23 22:35:06 +01:00
AsamK
5a4f4ba6db Implement message expiration timer version
Fixes #1605
2024-10-26 13:08:21 +02:00
AsamK
eca3c6fa30 Replace deprecated DBusMap 2024-09-08 19:24:18 +02:00
AsamK
c1775913b9 Implement dbus support for listIdentities
Fixes #195
2024-04-19 17:07:18 +02:00
AsamK
e456d06cb0 Add aci,pni to API RecipientAddress 2024-04-15 19:23:50 +02:00
AsamK
e0cd5b987e Add handling for new nickname and note fields 2024-04-15 19:23:50 +02:00
AsamK
d356d92b5e Extend getUserStatus command for usernames 2024-03-22 10:54:42 +01:00
AsamK
d84362eb0f Add sendMessageRequestResponse command 2024-02-18 20:48:16 +01:00
AsamK
6cd57312a1 Add parameter to configure phone number privacy 2024-02-18 20:42:41 +01:00
AsamK
7cf3a989bf Add command to retrieve avatars and stickers
Fixes #1125
2024-02-09 22:10:46 +01:00
AsamK
1bf703b012 Add --bus-name option to use different D-Bus bus name 2024-02-09 18:07:30 +01:00
AsamK
76fe6ad799 Recreate recipient database with aci column 2024-01-28 22:38:41 +01:00
AsamK
ca1a852b44 Handle mentions when receiving from dbus 2024-01-22 18:40:39 +01:00
AsamK
30e8e36635 Add --unrestricted-unidentified-sender to updateAccount command 2024-01-13 16:00:55 +01:00
AsamK
3290a5bf4d Add --notify-self parmeter
Fixes #1087
2024-01-12 18:09:42 +01:00
AsamK
37c65ca6b4 Implement username links 2023-11-21 17:09:21 +01:00
AsamK
7b0744ec75 Add --hide parameter to removeContact command 2023-11-11 11:39:33 +01:00
AsamK
9741c93ce9 Move all dbus interaction to dbus package 2023-11-10 15:44:42 +01:00
AsamK
5d33f71d4d Use improved shutdown for receive command 2023-11-09 19:23:11 +01:00
AsamK
e61f587bfc Reduce use of printStackTrace 2023-11-07 09:28:29 +01:00
AsamK
fc2e9bbfae Fix inspections 2023-10-17 20:34:21 +02:00
AsamK
d51dd7ae57 Use .isEmpty() for checking lists and strings 2023-10-17 20:34:21 +02:00
AsamK
33c4e17c0d Implement change phone number
Closes #1240
2023-10-14 23:37:23 +02:00
AsamK
a66dd0dc79 Implement EditMessageReceived signal for dbus 2023-10-10 20:21:40 +02:00
AsamK
e867c57af8 Add addStickerPack command 2023-08-20 22:36:18 +02:00
AsamK
4f8da7819e Reformat code 2023-06-05 19:30:18 +02:00
AsamK
106af6a801 Refactor trust command implementation 2023-06-03 16:10:47 +02:00
AsamK
ff162cb44d Refactor addDeviceLink method 2023-05-23 19:34:13 +02:00
AsamK
e5a67d6ce1 Refactor manager lib package structure 2023-05-23 19:34:13 +02:00
AsamK
8a0005d900 Remove unused code 2023-05-21 11:18:18 +02:00
AsamK
8a31b7f2c1 Implement editing of previous messages 2023-05-11 19:10:29 +02:00
AsamK
9f60ed534a Implement support for usernames 2023-04-03 19:00:05 +02:00
AsamK
03f193b34c Fix deleting old group in dbus mode
Fixes #1192
2023-04-02 19:25:49 +02:00
AsamK
15da210de7 Print text styles in plain text output 2023-01-27 21:46:39 +01:00
AsamK
5771bb858f Allow using data URIs for updateGroup/updateProfile avatars
Fixes #1082
2022-11-14 19:31:40 +01:00