Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ All notable HyperMeow changes are documented here. HyperMeow uses commit pseudo-

### Added

- Add call-link guest registration and login with one-call in-memory Signal stores.

- Opt-in concurrent WebSocket connections through `SocketConfig.RaceURLs`, with asynchronous loser cleanup and support for native and JS/WASM builds. See [connection options](README.md#connection-options).
- `Client.DisablePostConnectPassiveIQ` to skip the post-connect passive/active IQ when the login payload already declares an active connection.
- Persist hosted (coexistence) pairing as `store.Device.IsHosted` and report it on `events.PairSuccess.IsHosted`. SQL-backed stores upgrade to schema version 20, which adds `whatsmeow_device.is_hosted` (default `false`).
Expand All @@ -20,6 +22,16 @@ All notable HyperMeow changes are documented here. HyperMeow uses commit pseudo-

### Fixed

- Keep provider response text out of displayed guest registration errors while retaining explicit diagnostics.

- Bound guest Signal identities, sessions and sender keys before retaining peer data.

- Redact malformed call-link and registration URLs from returned errors, including reflected redirect locations.

- Reject guest registration redirects and bound guest prekey uploads and retained keys.

- Preserve guest identity-reader trust and deletion fences during identity verification.

- Migrate an established hosted PN session when the peer starts sending from its hosted LID. SQL-backed migration uses literal address-prefix ranges so hosted underscores cannot select or delete another account's keys.
- Use one Signal address for a hosted device 99 when decrypting its messages, sending to it and answering its retry receipts: `<lid>:99@hosted.lid` when the account's LID is known, otherwise `<pn>:99@hosted`. Hosted sessions no longer collide with a regular device 99, and sessions stored under the PN hosted address move to the LID hosted address. `MessageInfo.Sender` still reports hosted senders on the regular servers.
- Redact shared-device and root secrets from app-state mutations in trace logs.
Expand Down
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,3 +264,52 @@ Disconnect and wait for owned work to settle before accepting replacement
connection authority. `FrameSocket.SetOnDisconnect` replaces the callback under the socket lock; assign
the legacy field only before connecting.
These additions are unreleased until their reviewed main commit is adopted.

## Call-link guests

The `guest` package registers a one-time guest identity for a WhatsApp call
link and logs it in without pairing a phone. The identity lives only in
memory and only for one call:

```go
import "github.com/polymorfa/hypermeow/guest"

device := guest.NewDevice(nil) // fresh keys, in-memory stores
reg, err := guest.Register(ctx, device, guest.Request{
InviteCode: "https://call.whatsapp.com/voice/TOKEN",
Name: "Ada",
})
if err != nil {
return err
}
client, err := guest.NewClient(device, reg, nil)
if err != nil {
return err
}
err = client.Connect()
Comment thread
purpshell marked this conversation as resolved.
Resolved
```

`NewClient` applies the guest identity before creating the client, sets the
guest login payload, turns off the post-connect passive IQ and uses the
registered browser's User-Agent. `Request.BaseURL` points registration at
another host, such as a simulator. A guest can only join the
call link it registered for. Messaging, groups and app state don't apply.

Guest registration never follows HTTP redirects, including with a supplied
HTTP client. Point `BaseURL` directly at the intended registration service.
The in-memory guest store retains at most 1024 unconsumed prekeys, including
at most 64 retry keys. Upload attempts are at least one second apart; new
upload batches are generated at most once per minute. A failed upload can
retry its pending keys after the shorter interval. These local resource limits
return an error when reached and never evict an unconsumed key.

Signal identities, sessions and sender keys share a limit of 1024 entries and
16 MiB of stored key/value data, in addition to the prekey limit. Each address
is limited to 512 bytes. Writes beyond those limits return an error without
evicting trusted identities. Replacing existing state or deleting identities
and sessions releases the corresponding capacity. These are local policies
for one-call guests, not WhatsApp server limits.

Registration error strings omit provider response text. Typed `guest.Error`
fields and unwrapped causes remain available for explicit diagnostics and may
contain reflected request data; avoid logging them without redaction.
Loading
Loading