* cli: add --relay-address-server option for chat relay
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.
* cli: add --user-display-name option
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.
* cli: add --user-image-file option
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.
* cli: address PR review comments
- 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
* cli: enforce profile image size limit in --user-image-file
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.
* core: validate profile image size in chat commands
Enforced in CreateActiveUser, updateProfile_, newGroup, runUpdateGroupProfile
via checkProfileImageSize; max 12500 bytes (matches mobile UIs).
* fix: thread new ChatOpts/CoreChatOpts fields through bot/test constructors
* bots/docs: filter hidden params before type introspection
Hide APICreateMyAddress server_ field so the bot doc generator does not
try to introspect SMPServerWithAuth (an unregistered type).
* core: validate full encoded profile size
Add checkProfileSize / checkGroupProfileSize that encode the full
ChatMessage and check against maxEncodedInfoLength, so a long
displayName/bio combined with a near-max image is also caught at
command time instead of failing later at send time with CEException.
Run alongside the existing checkProfileImageSize (image-only cap of
12500 bytes, matching mobile UIs) in CreateActiveUser, updateProfile_,
newGroup, runUpdateGroupProfile. Update genProfileImg to fit the cap.
* cli: add --headless option for chat relay
Skips interactive prompts (relay address creation, display name) so the
chat relay can run non-interactively as a service. Requires --relay;
creating a new profile also requires --user-display-name.
* test: cover profile image size limit and address server
Adds tests for two new capabilities:
- profile image size validation rejects oversized images
- /_address with a server pins the address to the requested SMP server
* core: update simplexmq (pass optional SMP server to prepareConnectionLink)
* cli: add /set profile image file, fix image flag
Add "/set profile image file <path>" command to set the profile image
from a .png/.jpg/.jpeg file in a running session.
Make --user-image-file create-only: for an existing user it now no-ops
with a note instead of failing with "chat not started" (the update ran
before the chat controller was started).
* core: unify image loading and profile size checks
- loadImageFile (CLI) and readProfileImageFile (command) now share one
loadImageData; removes the duplicated mime/base64 encoding and its
decodeUtf8/safeDecodeUtf8 divergence. A missing --user-image-file no
longer crashes with an uncaught IOException, and empty files are rejected.
- checkProfileSize/checkGroupProfileSize share checkInfoSize.
- --relay-address-server/--headless requires-relay checks use
errorWithoutStackTrace, matching the adjacent validation (no callstack dump).
* bots/docs: document UpdateProfileImageFromFile as a CLI command
* core: update simplexmq
* update agent api
* update simplexmq
* core: add flag to User to use client services
* update simplexmq
* cli command to toggle service for a user
* test, fix
* query plans, core/bot api types
* remove local package reference
* increase server queue size in tests
* show client service status in users list
* update query plans
* cli: fix redraw slowness (#6735)
* cli: add pland to fix redraw slowness
* updtae doc
* cli: decouple key reading from processing via TQueue
* schema and bot types
---------
Co-authored-by: sh <37271604+shumvgolove@users.noreply.github.com>
* rfc: bot messages and buttons
* update
* update bot rfc
* core: add bot commands to chat preferences and peer type to profile
* update postgresql schema
* update query plans
* chat sessions preference
* markdown for bot commands
* schema
* core: file preference, options to create bot from CLI
* core: different command type
* ios: commands menu
* update types
* update ios
* improve command markdown
* core, ios: update types
* android, desktop: clickable commands in messages in chats with bots
* android, desktop: commands menu
* command menu button, bot icon
* ios: connect flow for bots
* android, desktop: connect flow for bots
* icon
* CLI commands to view and set commands, remove "hidden" property of command, bot api docs
* corrections
* fix inheriting profile preferences to business groups
* note on business address
* ios: export localizations
* fix test
* commands to set file preference on user/contact, tidy up layout and display of command and attachment buttons
* core: pass event and response error without dedicated constructor
* ios: WIP
* android, desktop: update UI for new API
* ios: fix parser
* fix showing invalid chats
* fix mobile api tests
* ios: split ChatResponse to 3 enums, decode API results on the same thread
* tweak types
* remove throws
* rename
* core: split response to two types, to improve iOS parsing memory usage
* ios: split core events to separate types
* comment
* limit more events to CLI
* fix parser
* simplemq
* Make it compiler with 9.6
Can be built with:
cabal build all -j --allow-newer=base --allow-newer=ghc-prim --allow-newer=template-haskell --allow-newer=bytestring --allow-newer=memory --allow-newer=cryptonite
Using ghc 9.6
It mostly runs afoul of https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0366-no-ambiguous-field-access.rst
* compile with GHC 9.6.2: dependencies, imports, code
* update GHC version in CI
* update GHC version in desktop build scripts
* update simplexmq, sha256map.nix
* update compiler
* update simplexmq, direct-sqlcipher
* remove missing files from .cabal
* building on desktop
* mac build changes
* added version back
* building libffi from source
* update simplexmq
---------
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
Co-authored-by: Avently <7953703+avently@users.noreply.github.com>
* SimpleX Directory Service
* more events
* update events
* fix
* Apply suggestions from code review
metavar
Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
* metavar 2
Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
* process events
* remove command serialization
* update
* update
* process group profile update
* basic group registration flow
* search works
* better messages
* improve messages
* test broadcast bot
* test for directory service
* better processing of group profile change, test
* refactor
* de-list group when owner or service is removed from the group, tests
* fix: removing any member or any member leaving should not delist the group
* refactor
* more tests, fixes
* disable bot tests in CI
* remove comment
---------
Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
* core: message reactions
* remove comments
* core: commands to set reactions
* fix tests
* process reaction messages
* store functions
* include reactions on item updates
* remove print
* view, tests
* load reactions for new items
* test removing reaction
* remove spaces
* limit the number of different reactions on one item
* remove unique constraints
* fix permissions
* indexes
* check chat item content before adding reaction
* fix group reactions
* simpler index
---------
Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>