feat: client core, accounts, link URI, errors
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9c78dd3bd1
commit
a3136305d3
7 files changed
+583
No files matched your search
@@ -0,0 +1,25 @@
|
||||
// Package signalbot sends and receives Signal text messages through a
|
||||
// signal-cli-rest-api service (https://github.com/bbernhard/signal-cli-rest-api).
|
||||
//
|
||||
// signalbot is an unofficial client, not affiliated with Signal. The Signal
|
||||
// protocol itself is handled by signal-cli inside the service container;
|
||||
// this package is pure Go and only speaks HTTP and websocket to it.
|
||||
//
|
||||
// Basic usage:
|
||||
//
|
||||
// client, err := signalbot.New("http://signal-api:8080")
|
||||
// if err != nil { ... }
|
||||
//
|
||||
// // Send to a group ("group.<base64>"), a phone number or an ACI UUID.
|
||||
// err = client.Send(ctx, groupID, "Hello from signalbot")
|
||||
//
|
||||
// // Receive incoming text messages until ctx is cancelled.
|
||||
// err = client.Listen(ctx, func(ctx context.Context, m signalbot.Message) {
|
||||
// _ = m.Reply(ctx, "got it: "+m.Text)
|
||||
// })
|
||||
//
|
||||
// The service must run with MODE=json-rpc (or json-rpc-native) and
|
||||
// JSON_RPC_RECEIVE_MODE=manual, and Listen should run permanently, even if
|
||||
// the application only publishes: receiving also processes the retry
|
||||
// receipts that keep group members able to decrypt the bot's messages.
|
||||
package signalbot
|
||||
Reference in new issue
Block a user