Reject the file if the encoded data URL exceeds 12500 bytes - matches
the cap mobile and desktop UIs pass to resizeImageToStrSize for profile
images. Without this, oversized images would be silently set on the
user profile.
- rename APICreateMyAddress field srv_ to server_
- extract repeated `loop` and putStrLn from createActiveUser via
prompt where-clause
- fuse u_ inspection: validate active user display name in the same
case that creates the user when missing
Switch to the new wrapper instead of passing Nothing through createConnection
at every call site. Only APICreateMyAddress with srv_ Just routes through
the new wrapper.
Sets the active user's profile image from a .png/.jpg/.jpeg file at
startup. Reads file, base64-encodes as data URL, and updates the user
profile directly in the DB - no notification is sent to existing
contacts. Skips the update if the stored image already matches.
Requires --user-display-name.
Selects or creates the active user non-interactively:
- no active user: create one with the given display name
- active user with matching localDisplayName: continue
- active user with different name: exit with error
Mutually exclusive with --create-bot-display-name.
New CLI flag --relay-address-server SERVER selects the SMP server used
for the chat relay address link created at startup. Only valid together
with --relay; errors out otherwise.
Threads Maybe SMPServerWithAuth through APICreateMyAddress to the new
agent createConnection parameter.
* ui: fix crash and logo cutoff on About SimpleX Chat
OnboardingShrinkingLayout calls .first() on each slot's measurables,
crashing when the button slot is empty. About passes onboardingStage =
null, in which case the button slot emits no children. Have the About
branch emit a 0x0 Spacer so the slot always has one measurable.
Also add a top inset for the SimpleX logo when reached from About in
non-oneHandUI mode — without it the top app bar overlaps the logo.
* style
Co-authored-by: Evgeny <evgeny@poberezkin.com>
* Apply suggestion from @epoberezkin
Co-authored-by: Evgeny <evgeny@poberezkin.com>
---------
Co-authored-by: Evgeny <evgeny@poberezkin.com>
* android: fix link preview fetch via SOCKS
* fix: add timeouts to link preview image fetch
Match the 10s timeout already on the Jsoup HTML fetch. Without these,
a slow or dead SOCKS proxy hangs the image fetch indefinitely, holding
the previewMutex and blocking every subsequent preview.
* timeout
---------
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
Co-authored-by: shum <github.shum@liber.li>
* android, desktop: fix link previews bypassing SOCKS proxy
getLinkPreview used Jsoup.connect() and URL.openStream() directly,
bypassing the configured SOCKS proxy. Both the HTML fetch and image
download now route through the proxy when one is configured.
If the proxy address is misconfigured (unparseable port), the preview
is cancelled and the user is alerted rather than falling back to a
direct connection.
When enabling SOCKS proxy with link previews active, or enabling link
previews while SOCKS is active, the user is warned that DNS lookups
may still occur locally and given the option to disable previews.
Updates the SOCKS proxy limitations notice to clarify that calls
cannot be proxied, and highlights it in warning colour.
Note: DNS lookups may still occur locally before the SOCKS connection
is established. Full SOCKS5h hostname forwarding is a separate follow-up.
* android, desktop: fix SOCKS proxy parser, auth credentials, and repeated alert in link previews
- Build proxy from typed NetworkProxy fields instead of parsing socksProxy string, fixing breakage on IPv6 hosts and USERNAME auth configurations
- Register java.net.Authenticator for SOCKS5 credential negotiation (Java 21 SocksSocketImpl uses RequestorType.SERVER for this callback)
- Remove per-keystroke invalid-proxy alert, which fired on every URL change for valid but unparseable proxy strings
* ui: drop link preview SOCKS warnings and strings
* ui: soften link preview alert when SOCKS is on
Show the link previews opt-in alert in both SOCKS-on and SOCKS-off
cases (previously skipped entirely when SOCKS was on). When SOCKS
is on, use a softer description that mentions the proxy and the
remaining local DNS lookup risk, and render the Disable button in
primary colour instead of red.
Also drop the link-previews caveat from the SOCKS limitations
footer since previews now go through the proxy.
* fix: harden socks proxy auth in link previews
- Gate the SOCKS5 Authenticator on host:port match so destination 401
challenges no longer leak proxy credentials via the JDK auto-retry.
- Snapshot Authenticator.getDefault() and restore in finally to stop
leaking process-global state.
- Mutex around getLinkPreview to serialize concurrent calls.
- Generate a random UUID per call in ISOLATE mode for stream isolation.
- Skip auth when USERNAME mode has empty username or password.
* ui: shift red emphasis from Disable to Enable in link preview alert
Disable is now always primary; Enable is red by default and primary
when SOCKS is on. The dangerous action is enabling without proxy
protection, not disabling.
* ui: append SOCKS notice to link preview alert
---------
Co-authored-by: iversonianGremling <24989959+iversonianGremling@users.noreply.github.com>
* directory: re-invite owner who left owners' group
The /invite command's alreadyMember check treated any GroupMember row as
a current member, including rows with status GSMemLeft or GSMemRemoved.
Owners who had left the owners' group could therefore not be re-invited.
Use memberCurrent to only block re-invite when the member is actually in
the group.
* directory tests: account for admin notification and renamed group on re-invite
The owners' group has no GroupReg by design, so when an owner leaves it
the directory service notifies admins with "Error: contact left, group: N
owners, group registration not found" - expected behavior, but the test
for re-inviting an owner who left the owners' group did not consume this
DM and failed at bracket cleanup.
The test also assumed bob's new invitation would land in #owners, but the
chat client disambiguates it to #owners_1 because bob's old left
membership of #owners is still present locally.
Consume the admin DM explicitly and update the invitation assertions to
#owners_1 / /j owners_1.
---------
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
The active-call action button row (mute, speaker, hang up, flip/toggle camera)
was rendered with only a fixed 20.dp bottom padding. Under edge-to-edge layout
on devices with 3-button navigation, the system nav bar (~48.dp) drew on top
of these buttons, hiding part of them.
Add `.navigationBarsPadding()` to the BoxWithConstraints holding the buttons
so the row floats above the system nav bar inset. No effect on devices using
gesture nav (the inset there is small enough to not collide).