* android: group link role, add observer role
* padding
* disabled tint for buttons
* proper layout for long display name
---------
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* core: initial group member role when joining via link
* fix tests
* set role when joining group via link, enable observer test
* show group link when role changes
* amend test
* check role is member or observer when creating a link
* website Internationalization (#1904)
* added devcontainer config
* internationalization under dev
* internationalization of _data done
* overlays internationalization done
* improved routing
* updated gitignore
* remove .devcontainer
* internationalization in progess
deleted all the intermediate files
added translation of few sections
* remaining website strings are added to translation
* done internationalization
- fully converted to i18n plugin
- wrote bash script for creating a combined translations.json
* internationalization UI done
* a quick fix
* remove jq installation
* Added translation using Weblate (German)
* Translated using Weblate (French)
Currently translated at 100.0% (212 of 212 strings)
Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/fr/
* Translated using Weblate (German)
Currently translated at 42.9% (91 of 212 strings)
Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/de/
* fixes of web Internationalization (#1925)
* a quick fix
* blog route for all languages is shifted to root blog route
* wrote merge_translations.js
* remove language label from dropdown
* update language names
* refactor scripts
* remove catch from script
* Added translation using Weblate (Dutch)
* Added translation using Weblate (Norwegian Bokmål)
* Translated using Weblate (Dutch)
Currently translated at 33.0% (70 of 212 strings)
Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/nl/
* website: internationalization fixes (#1931)
* added devcontainer config
* internationalization under dev
* internationalization of _data done
* overlays internationalization done
* improved routing
* updated gitignore
* remove .devcontainer
* internationalization in progess
deleted all the intermediate files
added translation of few sections
* remaining website strings are added to translation
* done internationalization
- fully converted to i18n plugin
- wrote bash script for creating a combined translations.json
* internationalization UI done
* a quick fix
* blog route for all languages is shifted to root blog route
* wrote merge_translations.js
* remove flag from blog
* updated nav stylings & logo links
* add enabled key
* updated nav dropdown styling
* gave specific lang to i18n plugin.
overlay translations are now working.
* enable nl & nb_NO
* updated nav stylings
* updated contact.js
---------
Co-authored-by: M Sarmad Qadeer <msarmadqadeer@gmail.com>
* Translated using Weblate (German)
Currently translated at 47.6% (101 of 212 strings)
Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/de/
* fixed internationalization issues
* updated strings, refactor contact.js
* updated nav stylings for mobile
* a bit smaller padding on mobile
* Added translation using Weblate (Czech)
* Translated using Weblate (Czech)
Currently translated at 100.0% (212 of 212 strings)
Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/cs/
* Translated using Weblate (French)
Currently translated at 100.0% (212 of 212 strings)
Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/fr/
* Translated using Weblate (German)
Currently translated at 100.0% (212 of 212 strings)
Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/de/
* enabled languages
* check/correct (#1949)
---------
Co-authored-by: M Sarmad Qadeer <MSarmadQadeer@gmail.com>
Co-authored-by: Ophiushi <Ophiushi@users.noreply.hosted.weblate.org>
Co-authored-by: mlanp <github@lang.xyz>
Co-authored-by: John m <jvanmanen@gmail.com>
Co-authored-by: zenobit <zen@osowoso.xyz>
Co-authored-by: Ophiushi <41908476+ishi-sama@users.noreply.github.com>
* mobile: including fully localized languages only
* better place for code
* ios: including fully localized languages only
* Revert "ios: including fully localized languages only"
This reverts commit 42a0334d83.
* ios: colored and clickable qr code with logo
* size of circle
* same padding as in android
* add padding to logo
---------
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* android: colored and clickable qr code with logo
* save qr code as jpg for better quality
* bigger logo
* bigger logo (0.16f), low error correction (QR scans ok with up to 0.26f circle size)
---------
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* ios: support query string parameters in ICE server addresses
* android: support query params in ICE server address, add transport=TCP to default servers
* mobile: do not end calls
* better way of continue connection and end with timeout
* making data classes instead of classes for making logs informative
* refactor
* update webrtc package version
* refactor
* fix
* clear conneciton timeout on disconnection
* refactor
* v0.2.1
---------
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* core: use port 7001 for test server
* enable only failing tests
* start/stop server for every test
* log message that failed to parse
* stop chat synchronously
* print call stack
* add HasCallStack
* increase test timeout
* add call stacks
* more call stacks
* fix test
* disable failing test
* add delay between the tests
* make delay more visible
* remove change in error message
* reduce test delay, increase timeout
* increase delay between the tests
* run each test with a database in a different folder
* folder name
* refactor
* update nix file, more stacks
* android: show alert instead of crash on user errors
* show meaningful alert
* update alert messages
---------
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* ios: update chat previews, show filename in drafts
* save and restore images/file/voice for draft
* refactor image
* it was a wrong value
* use param label
* proper stop of voice recording
* safe draft logic
* different way of finishing recording
* keep condition
* refactor
* fix live
* fix
* refactor
* fix
* simplify
* add space after filename in draft
---------
Co-authored-by: Avently <7953703+avently@users.noreply.github.com>
* updated the design of join simplex
* updated the design of Comparison section
* updated the design of Simplex explained
* updated the design of Simplex network
* updated the design of private section
* updated the design of features section
* updated the design of unique section
* updated the design of privacy matters
* added improvements in design
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* android: mutliuser-calls
* tint color of icon
* userId from function
* better line
* missing question
* bigger avatar
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* ios: preserve message draft in the latest chat only
* show attachment icon and formatting in draft
* button to remove message text
* show icon for active draft, refactor
* add voice message duration to draft
* ios: Testing workaround of a crash
* another try
* complete
* added file
* enable swipe to go back from ChatView
* Revert "enable swipe to go back from ChatView"
This reverts commit 22de79505c.
* ios: enable swipe to go back from ChatView
* remove title change
* remove unused
* remove unused variable
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* ios: choose user deletion mode
* update text
* refactor, disable button
* darker profile icon colors
* do not delete active user if changing user failed
* android: multiuser-api
* add line in try-catch block
* changed lines position
* when -> if
* take condition outside
* mutable version of objects and usage of a new function
* changed additional places in code
* added toMap() so state will be updated
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* ios: Testing workaround of a crash
* another try
* complete
* added file
* enable swipe to go back from ChatView
* Revert "enable swipe to go back from ChatView"
This reverts commit 22de79505c.
* refactor
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* ios: Small UserPicker fixes
* update scroll
* update current user and update users list
* refactor
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* ios: Multiuser calls
* counter update on badge
* padding before profile info in call view
* underline in name
* change after merge
* do not show Simplex Info button if users already created
* unread counter
* do not increase badge counter when chat has disabled notifications
* update incoming call
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* mobile: add PING count to network config, make advanced network config available without dev tools
* export ios translations
* add 120 sec PING interval back
* api
* UCR
* Revert "UCR"
This reverts commit 1f98d25192.
* comment
* events User
* events in api User
* CRActiveUser in APISetActiveUser
* process message with/without connection
* refactor
* mute error
* user in api responses
* name
* lost response
* user in CRChatCmdError
* compiles
* user in CRChatError
* -- UserId
* mute unused warning
* catch in withUser
* remove comment
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* mobile: fix race condition with live messages (when message is "revived" when it is being sent as no longer live – possibly core should reject "live" updates to non-live messages too)
* android: move delay for live messages
* android: Timed messages TTL logic in preferences
* do not set ttl in global timed message prefs
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* android: Disappearing messages
* remove unused func
* remove paren
* outlined timer in meta
* reserving space for meta takes into account ttl text
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* android: Live messages
* White color
* Spacer
* button sizes
* Do not show voice button in live mode
* Add text to the last image in a row
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* core: do not start disappearing timer for live messages until they stop being live, and start it on item update instead, provided they are read
* change delays in tests
* diffInSeconds
* ios: live messages
* remove comments
* remove conflict
* live message buttons and alert
* only send full words
* fix double sending
* typing indicator in live items
* add live parameter to API
* typing indication, pass live parameter to API
* refactor to support live messages with attachments
* disable attachments
* android: Show error instead of crashing after failed to parse chats
* Just for test
* update strings
* Revert "Just for test"
This reverts commit f9c9a20ab6.
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* android: Fix crash on multiple selection of images
* Revert "android: Fix crash on multiple selection of images"
This reverts commit 11a6113b4f.
* Disable image selection when there are images already selected
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* android: Voice messages refactoring
* Different way to block text field from editing while recording voice
* Limited voice record max duration
* Better end of recording when it reaches timeout
* New way of doing things
* Change
* Change
* Stop event refactor
* Stopped state
* Replaced some helpers
* Replaced calls in when()
* Comments
* Change
* Change
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* ios: verify connection security code
* verification in member sheet (still crashes)
* use navigation view for members list
* ios: show verified status in the lists
* update verification status in the list of members
* verified shield layout
* update icon, make add member navigation to right
* refactor chatPreviewTitle
* android: Saving prefs alert on exit with unsaved changes
* DIfferent implementation for AlertDialog with long buttons
* Braces
* Change
* Alignment
* Rename
* small changes
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* android: Change of launchMode in an activity and different behavior of back button
- Android versions <= 10 are vulnerable to StrandHogg 1. This commit fixes the behavior of the app on affected versions of Android
* simplify condition
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* android: Better shared preference handling
* To make sure we return real value, not untransformed one
* Revert "To make sure we return real value, not untransformed one"
This reverts commit 5a268e2cf4.
* android: Closing call means canceling notification too
* show full screen call when screen is off OR locked
* make notification non-silent and set category
* remove call notification category
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* android: Vocie messages enhancements
* Canceling voice record when it was disabled in prefs
* Quote placement in voice message chat item
* Ordering of checks
* Showing progress logic was changed
* Showing progress logic was changed
* Update group prefs without reenter
* Optimization of voice chat items
* Stop audio playing and recoring when in call
* android: Show user's camera when system camera is unavailable
* Multiple places of camera launcher
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* android: Global preferences and per contact
* Fixes
* Changes in UI
* Fix
* Strings and more descriptions
* Spelling error
* No dots at the end
* Adapting changes from core
* Adapting changes from core
* Change
* Simplified user's choice with toggle
* Changes after merge
* Updated preferences to the latest changes in core
* Strings
* Changes
* Small changes
* Contact will be updated in UI too
* bigger icons in section headers
* Icons and colors
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* core: chat items for group preferences
* chat items for group preference changes and sent item for contact/user prerences changes
* prohibited features, tests
* enable all tests
* fix
* ios: advanced server configuration
* UI is mostly working, QR code scan
* refactor
* error alerts
* fixes
* remove old view
* rename view
* translations
* only show valid QR code, spinner during server test
* update tested status on edit
* space wtf
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* moar space
* translation
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* translations
* translations
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* mobile: show unknown content with attached file as file item (for partial forward compatibility with voice and video messages)
* fix
* android: show unknown files
* Audio messages testing
* Without Vorbis
* Naming
* Voice message auto-receive, voice message composing
* Experiments with audio
* More recording features
* Unused code
* Merge master
* UI
* Stability
* Size limitation
* Tap and hold && tap and wait and click logics
* Deleted unused lib
* Voice type
* Refactoring
* Refactoring
* Adapting to the latest changes
* Mini player in preview
* Different UI for some elements
* send msg view style
* *** in translation
* Animation
* Fixes animation performance
* Smaller font for recording time
* File names
* Renaming
* No edit possible for audio messages
* Prevent adding text to edittext
* Bubble layout
* Layout
* Refactor
* Paddings
* No crash, please
* Draw progress as a ring
* Padding
* Faster status updates while listening voice
* Faster status updates while listening voice
* Quote
* backend comment
* Align
* Stability
* Review
* Strings
* Just better
* Sync of recorder and players
* Replaced Icon's with ImageButton's
* Icons size
* Error processing
* Update apps/android/app/src/main/java/chat/simplex/app/MainActivity.kt
* rename composable
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* Restoring app's data from backup tools will still allow to enter passphrase instead of just crashing
(cherry picked from commit 256243dc8c)
* corrections
Co-authored-by: Avently <7953703+avently@users.noreply.github.com>
* android: Random crashes fix
(cherry picked from commit 0f7789c411)
* Better way of disabling members adding ato a group
(cherry picked from commit 96ca7f0d85)
* check outside
Co-authored-by: Avently <7953703+avently@users.noreply.github.com>
* android: User's problems fix
* Hiding keyboard, state preserving while rotating camera orientation
* Allows to select image from camera multiple times without crashing
* Images sending after orientation change
* Do not ask again about auth when switching between dialogs
* nav in process
* edited web.yml
* navbar issue fixed
* added theme switcher
* added privacy matters section
* added features section
* updated nav padding
* added network section
* improved sidebar dark mode colors
* added footer
* simplex private section added
* added some improvements
* nav issue fixed
* simplex unique section added
* a small fix
* added overlay & data to some sections
* added overlay to simplex unique section
added some improvements to other sections too
* added a small fix
* updated CNAME
* markdown files for why simplex is unique
* Revert "markdown files for why simplex is unique"
This reverts commit ef728218f7.
* added hero section
* added comparison and simplex explained section
* added blogs page
* added articles page
* a small fix in hero section
* added contact page
* updated contact
* created files for overlay content
* a light update
* hero animation
* working on hero
* added responsiveness for mobile
* a quick fix
* added responsiveness to tablet screen
* added responsiveness for desktop screen on hero section
* switch theme of hero
* nav color update
* set comparisons sections
* switch theme of comparisons section
* added responsiveness in simplex explained section
* add logic to simplex explained
* added theme switcher to simplex explained
* manage join simplex section
* update what makes simplex private
* a quick update
* add improvements
* a bit update
* add improvements
* texts for why privacy matters section
* update headers
* texts for "why unique" and "features" sections
* EOLs
* update swipers
* update & add transitions to simplex unique section
* updated overlays
* increase the size of cross on overlays
* add overlays to hero
* website: texts for "private" and "explained" sections (#5)
* website: texts for "private" section
* texts for simplex explained
* blog previews and images (#6)
* blog previews and images
* text for dark mode
* add link style
* add overlay to -> unlike p2p networks
* add picture with blue arrows to simplex explained
* update blog list layout
* remove extra css
* bigger navigation circles & center positions
* make bullets (dots) bigger
* make private scroll thicker
* update hero & footer mobile download btns
* fix dark mode animation files (#7)
* improved contrast for light animation in hero section (#8)
* remove old animation
* Made Hero Pixel Perfect to Desktop
* texts in hero section overlays (#10)
* texts in hero section overlays
* replace hero video
* eol
* update footer links (#11)
* update footer links
* eol
* texts, links, fix layout (#12)
* mailchimp form (#13)
* site meta tags (#14)
* site meta tags
* update blog og:url
* amend texts
* font
* update text
* contact page
* Making things Polished in Hero (#15)
* Made Video Responsive on Tablet
* Fixed the issues
* remove extra files for home & contact page
* update invitation
* refactoring
* fix nav for dark
* quick fix
* update blog list layout
* refactoring
* disable inactive nav circles
* contact page
* fix mobile
* detect platform & show btns according to it
* contact & invitation page setting
* complete contact/invitation page
* create variables for download btns
* fixes for hero - for tablet & mobile
* update hero layout
* update footer layout
* increase the size of logo in navbar
* updated nav & footer logos
* add links to join simplex section
* text for p2p networks section
* text on contact page about link
* add touchstart handler to close popup
* update APK links
* update CNAME
Co-authored-by: M Sarmad Qadeer <MSarmadQadeer@gmail.com>
Co-authored-by: Ojas Shukla <54703305+whizzbbig@users.noreply.github.com>
* android: Connect via group link alert
* Rename
* Replace first
* rename CRData into CReqClientData to match haskell type
* Alert
* Shorter
* Strings
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* core: update chat preferences
* refactor, types
* rename types
* rename types
* make voice on by default
* create new user with empty preferences
* fix test
* android: Settings to auto-accept contact requests
* Link will not be recreated when not needed
* Layout
* Layout
* Button rename
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* core: Auto accept via address and incognito mode specified
* Fix test
* Refactoring
* No forcing
* Apply suggestions from code review
* refactor
* refactor AutoAccept
* Test
* Test
* allow different test output order
* rename
* rename
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* ios: use transparent background for images without text and quote (#1224)
* android: Some small fixes (#1221)
* android: Some small fixes
* Alpha in preview image
* ImageView width limitation for portrait images
* Sharing files with a text
* Do not create new link on orientation change
* Skipping quoted item when applying transparent background
* Commented out sharing a text of image message
* Revert "ImageView width limitation for portrait images"
This reverts commit b1f20b51da.
* White color
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* android: Some small fixes
* Alpha in preview image
* ImageView width limitation for portrait images
* Sharing files with a text
* Do not create new link on orientation change
* Skipping quoted item when applying transparent background
* Commented out sharing a text of image message
* Revert "ImageView width limitation for portrait images"
This reverts commit b1f20b51da.
* White color
* android: EditText instead of BasicTextView with ability to get images from keyboard
* Padding
* Empty, not blank
* Keyboard handling
* Setting text of edited message and bigger padding
* core: support inline file transfers
* parameterize ChatMessage
* send files inline when accepted
* accept inline file transfers (almost works)
* db error SERcvFileInvalid
* inline file transfer works (TODO fix test)
* inline file transfer tests, change encodings
* fixture
* combine messages into x.file.acpt.inv, refactor
* inline file mode
* decide whether to receive file inline on the recipient side, not only via file invitation
* test inline files "sent" mode
* check that file was offered inline
* update schema
* enable encryption tests
* test name
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* fix the list of rcv files to subscribe too
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* android: Image gallery
* Do not scroll to active item
* Infinity pager
* Fixed small issue with the first page
* Limited image height
* Revert "Limited image height"
This reverts commit d5733da6a3.
* Scroll at top position after click on quote
* Better scrolling
* android: Multiple images can be sent at the same time in different messages
* Padding
* Removing an ability to delete selected image, filtered out videos
* Optimization
* android: New chat dialog
* Click indication was disabled
* Color experiments
* Padding
* Padding
* Second variant
* Third variant
* Another style
* Another part
* update buttons
* Another try
* Elevation
* Empty view when no chats available
* update buttons
* do not hide "you have no chats" with new chat dialog
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* android: Connection info
* UI changes
* Icon in text field
* Alias text field
* Revert "Alias text field"
This reverts commit 2ac694db4d.
* Padding
* Layout changes
* Bigger delay
* UI changes
* UI changes
* core: protocol/commands to change member role
* change member roles
* add test
* correction
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* add member profile to group member role events
* resend invitation when invited member role changes
* test role change with invitation, fix
* add delays to tests
* add test delay
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* android: UI overhaul start
* Moved title upper in a view and modified UI of some elements
* AppBar refactoring
* Color for settings modal in a light theme
* Returned big title
* Animation between screens
* Title placement
* Animation between screens
* Properly removing a value
* Properly removing a value
* make entry/exit animation the same
* fix first screen
* update first screen logo
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* Two more notifications when contact connected or connection request received
* Large image in notification
* Do not show contact's icon when it't not permitted
* Sound and vibrate for notification
* No large icon in other cases
* Small change
* Floating button for creating a new chat
- also fixed two-line preview in a chat list
* Button color in light theme
* update button color, remove elevation
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* android: UX for making connections
* Tabs background color was specified
* Different icon and description
* update texts, fix layout on ios small screens
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* wip
* display current storage state
* alert
* fix
* simplify
* remove unused function
* fix log
* replace prints with logger
* Apply suggestions from code review
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* low res will remain text
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* Restore database from a backup when encryption fails for some reason
* Removed unused code
* Safer way of doing some things
* Ordering
* Increased possible diff in time to 10 seconds
* update strings
* Alert confirmation
* update strings
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* Changed requirements for ignoring battery for Periodic notifications mode
* Add delay before running ON_RESUME events because some data is not ready yet on that stage
* Better idea of when to show background notice
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* Ability to encrypt credentials and to store them securelly
* Don't regenerate key if it exists
* Made code shorter
* Refactoring
* Initial support of encryped database
* Changes in UI and notifications about database problems
* Small changes to how we use chatController instance
* Show unlock view in console automatically
* Fixed wrong place of saving a key
* Fixed a crash
* update icons
* Changing controller correctly
* Enable migration
* fix JNI
* Fixed startup
* Show database error view when password is wrong while enabling a chat
* Chat controller re-init in one more place
- also added one more alert
* Scrollable columns and restarted service and worker
* translations
* database passphrase
* update translations
* translations
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* update translations
* update translations
* update icon colors, show empty passphrase as not stored
* update translation
* update translations
* shared section footer, bigger font, layout, change entropy bounds
* correction
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* update translations
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* readme: fix link
* add 11ty files to website folder
* add web.yml
* add simplex web files
* add font matter to some blogs
* remove unnecessary things
* change few settings
* add a web script
* update web.yml
* update image format & add an image
* add font matter to blogs
* update blog.html
* add article layout & give that layout to blogs
* update the location of _includes
* update article layout
* change original blog links
* add styling to blog
* improve the links of blogs
* update web.sh
* add favicon
* update a tag in a blog
* improve stylings of article page
* improve styling of blog page
* update the theme
* update font matter and update links in new blog.
* add style changes
* apply reverse chronology sort on articles
* shift blogs links back to hashes
* add ids to headers & smooth scrolling
* make all blog links relative
* add smooth scrolling & add relative to absolute links converter
* add navigation
* improve mobile nav
* change desktop header style
* convert blogs link text to "Read More"
* change desktop header style
* style mobile nav
* fix landing page styling
* update web workflow
* update web workflow
* nav setting
* add tailwind links
* update web workflow
* remove app demo folder
* remove special characters from the links
* fix the issue of links
* make web.sh executable
* update blog links
* move web.sh to website folder
* code style
* EOLs
* format index.css & contact.css
* add markdown-it configuration
* add outline none on focus
* remove extra Javascript
* make mobile nav display none by default
* add permalinks to markdown files
* update 11ty config
* update web.sh
* update article
* resolve issue of special characters in header ids
introduce slugify
* add target _blank to whitepaper link
* add last post
* EOLs
* try to resolve bullets issue
* use markdown-it-replace-link
to convert relative .md extension to .html extension
* add missing images, simpligy link parsing
* add CNAME file
* add CNAME file, rename config
* fix jumping table issue
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* Option for periodically fetching new messages without starting a service
- also user can hide some content from notification, like it's text or/and author
* More stable notification worker
* Allowed to run periodic notifications when battery optimization is on
* corrections
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* correction
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* correction
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* Changes to notifications flow
* correction
* Made delay for receiving messages in worker longer
* correction
* check interval
* Update SimplexApp.kt, SimplexService.kt, and SimpleXAPI.kt
* update strings
* Strings
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* Disable compression of `res/raw` directory. Otherwise Android crashes the app when trying to open .mp3 file from the directory
* do not compress all files in res folder
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
- restore message text as well as reply state
- restore search view
- don't display blank view on orientation change for a moment
- better saving of local user name while typing. Prevent loosing state on orientation change and hard killing the app
- don't display same messages in MainActivity from old intents on orientation change (no double processing of intent)
* Options when using .onion hosts
* Confirmation alert before applying network settings
* Useless new line was removed
* Different ordering of options in enum
* Incognito mode
* Incognito icon color and state applying
* Added a spacer under username
* Local contact aliases support
* Simplified incognito
* update help title
* ChatInfo layout
* corrections
* color
* icon
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* ios: programmatic navigation between list/chat
* prevent chat info sheet from showing when switching conversation
* add direct chat with member to model
* set status to connected
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* Theme selector
- ability to select from three default choices: system theme, light, dark
- ability to choose color accent (primary color)
* Removed unused code and made small changes to colors and buttons
* Ability to disable notifications per chat
* All Buttons in AlertDialog replaced with TextButtons
* update icon
* update strings
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* Re-apply new chat instance on chatId changes
* Fixed incorrectly calculated counters on floating buttons
* Show chat at the bottom of a view instead of at the top
- on orientation change scroll position in chat wasn't preserved
- the app had been making multiple same queries to a database when tried to preload more messages
* Different level of APK compression
- can reduce from 200mb to 50mb with level 5 of compression. Supports Intellij IDEA and command line gradle invocation
- by default, this feature is disabled. To enable create a file local.properties in `apps/android` and paste this line: `compression_level=5`
- level can be from 0 (no compression) to 9 (slowest and the must effective)
- automatically enables `extractNativeLibs` AndroidManifest's flag since it's required in this case. Feel free to find an alternative that works with compression of .so libs and without enabling this flag
- Windows is not suppored, of course. Only Unix-like OSes
* script corrections
* Missing JAVA_HOME in some environments
* Rename release apk made by IDEA to simplex.apk
* Enhancements
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* Fixes service issues
- no more crashes after start of a service with battery optimization enabled
- no more service restarts after the app exit with disabled private notifications
* Disable service restart even after reboot if the user didn't allow this
* [Experimental] Disabling logic of start up process from application process. The same is enabled in a service anyway
- every application process creation makes the service running even in situations when it's not needed. For example, RescheduleReceiver from WorkManager receives boot completed event and it triggers service start up
* Returned unneeded part of code. It may be useful (in theory) if user's device doesn't allow any services to be started (it's something that should never happen)
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* Swipe to reply feature
- ability to reply by swiping on a message from right-to-left or left-to-right
- keyboard will be open automatically
* Only one direction for swipe to reply action
* Floating buttons with unread counters and go to bottom action
* Fixed marking read of long chats without preloaded messages
* Apply suggestions from code review
* Counters fix
* update button size/color
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* Endless scrolling in a chat view
- scroll position when you open keyboard/change screen orientation will remain the same
- scrolling to top will show messages from history
- unread messages will be positioned at the top of the screen
* Marking chat read message-per-message
* Prevent changing scroll position on orientation change
* Adapted new code to the old code
* refactor
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* Debug package suffix and ability to override Gradle variables
- now debug builds will have '.debug' suffix by default. It allows to have multiple app builds (debug and release) on the same device. If you don't need this, create a file local.properties and add `application_id_suffix=` into it
- now everyone can override some variables from top-level build.gradle file. For example, gradle_plugin_version, debuggable manifest attribute, and so on. Overriding Gradle plugin version is useful for those who uses Intellij IDEA with older Gradle plugin than in Android Studio
* Prevent socket name conflict from different packages
* Configurable app name for debug build. By default it's SimpleX Debug
* Changed defaults in build.gradle
- fixes issue with multiple backspaces in a BasicTextField. Before that update text field stops deleting characters after long press on the backspace key
* Removed gesture interception while long clicking on a chat bubble with a link
- allowed to skip motion event consuming based on touch offset
- long clicking on a link copies it to a clipboard
* Long click on a link shows menu instead of copying to clipboard
* EOLs
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* ios: advanced network settings
* save network config
* update network settins, set in NSE
* update UI, update simplexmq
* show advanced network settings only with dev tools on
* android: create group view wip
* wip
* android: add group view image wip (#856)
* new chat sheet layout
* alternative layout for new chat sheet
* simpler layout for new chat sheet
* fix add image sheet
* fix creating group
* add members when creating a group
* update text
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* ios: add member ui wip
* AddGroupMembersView
* clean up
* cleanup
* change new chat button
* update adding members
* add group name and image to adding members view
* adjust layout
* layout
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* update tls to 1.6.0 and change nix config
Revert "revert tls to 1.5.7 and nix config changes (#746)"
This reverts commit 976b1c919f.
* nix: update hackage index
* update hackage index
* core: use batched subscriptions
* update simplexmq
* remove comments
* clean up
* refactor
* remove todo
* revert change
* revert change
* remove comment
* add delay to the async group test
* add more delay in test
* core: communicate call invitations state between NSE and app via db
* enable tests
* delete calls, encoding
* load calls on start
* remove line
* remove table alias
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* core: import and export of chat archive
* export chat archive
* import archive, support starting chat after it is stopped
* test for maintenance mode
* test/fix archive with files
* prevent starting chat after chat database was deleted or imported
* update simplexmq
* core: chat item integrity
* create chat item on skipped messages (but only on content items)
* report skipped messages on all messages, not only content messages
* remove type signature
* remove migration
* update rfc
* mobile: timeout call invitations, more android options
* close overlays when call is accepted via notification
* show incoming call above modals, dismiss modals when call is accepted
* fix clickable area of create profile button
* fix pending intent for rullscreen notification, update settings
* android: webrtc calls notification and alert
* add ringtone to incoming call
* incoming call on full screen
* enable notification ringtone
* remove text
* use translated strings in call notification
* mobile: use updated_at in chat previews
* use updated_at returned from chat response
* refactor
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* mobile: webrtc calls work on Android and iOS separately
* core: only send public key with offer if invitation/current call supports e2ee
* update npm module
* use simplex.chat relay
* update webrtc settings
* WebRTCView to use command/response types
* compress WebRTC session descriptions, simple web UI for calls
* update webrtc ui
* use webworked in desktop browser
* use RTCRtpScriptTransform in safari
* update android type
* refactor
* add await
* Managing battery optimization on Android 12+ via in-app UI
- in case of battery optimization is enabled a user will be asked to disable it if he wants to have a background service
- when the service is enabled but the user don't want to disable the battery optimization, the service will be disabled with an alert for the user
* update service notice conditions
* android: update notification service logic
* update translations
Co-authored-by: Avently <7953703+avently@users.noreply.github.com>
* simplex-chat server
* typescript types for chat commands and command serialization
* typescript ChatResponse type
* more types
* more types
* websocket chat client
* aligb ts/haskell types
* chat server & TS client via websockets - it works
* TS chat client test
* TS chat client test
* update test
* more api functions
* more api methods, refactor, readme
* squaring chat bot example, fixes
* update readme
* remove console.log
* npm version 0.1.0
* mobile: onboarding
* ios onboarding: create profile and make connection
* how SimpleX works
* connect via link
* remove separate view for connecting via link, fix bugs
* remove unused files
* fix help on small screens, update how it works page
* layout
* add About to settings, tidy up
* rename function
* update layout
* translations
* translation corrections
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* correction
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* corrections
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* fix translations/layout
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* mobile: webrtc calls state machine
* android: call api types
* android: call api methods
* ios: connect calls via chat UI (WIP)
* ios: webrtc call connects via UI
* core: update call duration/status when x.call.end is received
* improve call UX/UI
* audio calls
* different overlay for audio calls
* toggle video/audio in the call
* ios: notifications service extension
* create notifications in NSE (WIP)
* refactor notifications to use in NSE
* prepend team ID to shared defaults name to silence the warning
* remove whitespace
* mobile: webrtc calls in webview (typescript WIP)
* typsecript compiles
* fix error messages
* TS works in chrome
* include ICE candidates into offer/answer, report connection state changes to host, end call on disconnection
* refactor, readme for .js file
* initial UI framework
* limited javascrtipt interaction
* run some js
* try to resolve permissions issues
* some initial RTC javascript
* approaching a workable js file
* js fixes
* tidy up js
* add some ui to web call
* fixes
* ready to test
* typo
* refactor for readability
* tidy up before adding encryption
* add transform to video streams
* tidy a little, audio encoding works, video fails
* minor changes
* use variables consistently
* e2ee video calls
git push
* include IV in outgoing message, decrypt fails when trying to read back
* add different prefix retention for differing frame types
* e2ee video calls with iv passed in band
* enforce use of VP8 encoding
* allow plaintext chunk only for video frames
* tidy up kotlin. Android <> browser tested
* minor ios changes
* capture js logs in xcode
* typo
* linting
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* open source qr code scanner
* refined error localisation - todo moved
* tidy up to make picking back up easier
* better errors
* scan images one at a time and once per second to avoid multiple requests being sent
* more sophisticated avoidance of repeat contact requests
* remove format specifier
* refinements
* update QR scanner to use boofcv
* remove dependence on zxing
* attribution
* Update apps/android/app/src/main/java/chat/simplex/app/views/newchat/QRCodeScanner.kt
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* ios: started pending connections UI
* ios: UI for pending contact connections complete
* this has to be getter, or it would break JSON parsing
* ios: update "initiated" status of connection
* core: batch contact disconnections and re-subscriptions to one event per server
* update simplexmq
* update query to use temp table
* remove old code
* initial implementation of textbox
* paste to connect box implemented (and tested) in android
* first pass at pastebox in iOS
* clean up iOS implementation
* put paste link page in for groups in android
* initial inclusion in iOS UI
* refactor naming
* lint kotlin
* fix typo
* ios: update "connect via link" ui, refactor connecting via link to use the one function
* android: update paste link UI
* add russian translations
* update translations
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* update translations
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* ios: get device token for push notifications
* ios: receive messages when background notification is received
* add notifications API, update simplexmq
* chat API to register and verify notification token
* update AppDelegate to recognize different notification types, update simplexmq
* core: api to enable periodic background notifications
* update simplexmq
* chat API to delete device notification token
* use base64url encoding in verification code
* update simplexmq for notifications
* update manifest
* autoverify domain
* add path prefix to intent filter
* support contact links
* add android app readme
* only allow a single simplex task at a time to avoid opening simplex 'on top' of app with link
* ios api
* ios wip
* android wip
* ios files folder
* ios get address on start
* android app files folder
* ios more backend
* android more backend
* translation
* ios image without text, remove preview
* android image without text, remove preview
* fix translation
* file name in previews and w/t text
* Revert "file name in previews and w/t text"
This reverts commit 0110570e55.
* ios filename in preview
* android filename in preview
* android wider images
* ios determine width on image for correct quote width
* ios images in previews wip
* ios square image in quote
* ios: update image layout
* android images in quotes
* android remove redundant modifier
* android clip to bounds
* android - image in right side of quote
* android refactor image view
* android - refactor, align quote text top
* android fix emoji view
* fix image layout
* full screen image view, fix quote layout
* android various size
* android fixed image width
* android meta on image
* ios: add drag gesture to hide full-screen image
* android: make image-only meta white
* refactor file.stored
* android: meta icon color
* android: open chat scrolled to last unread item
* copy/share image messages
* android: full screen image
* check file is loaded
* terminal: refactor view for messages with files
* android: change to onClick, only show stored file
* android: remove close sheet bar
* android: close image view on click
* translation
* android: pass showMenu to CIImageView to show menu on long click
* increase DropDown width
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* wire up api for link metadata parsing
* add getLinkPreview (synchonous for now)
* api wiring fix
* get network requests off main thread
* copy over state machine logic from iOS
* filter api parsing calls from logs
* refactor of image processing
* remove image deepcopy
* minor change to log filtering
* mobile: link previews
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* core: replace quoted content with MCText if the message itself is not MCText
* core: quoteData in ChatMonad (#518)
* core: quoteData in ChatMonad
* use throwChatError
Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
* refactor image utils and initial link metadata tools
* remove LPMetadata conversion as we will build our own view to avoid network calls
* initial very basic preview outline, remove icon loading
* connect preview view to compose view
* v0.1 barely working
* minor refactor
* refactor
* collect images effectively
* link up to api for send/receive
* rework async get metadata logic
* show previews in chat
* refactor resizing logic
* checkpoint before view editing
* ui changes
* housekeeping
* ui tweaks
* typo
* improve link preview design/logic
* resize image to target data size
* fix link preview state machine
* tidy up
* fix typo
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* switch to PHPicker for photos. TODO add back camera functionality. [rough]
* add back camera selection option
* remove force unwrap of optional
* response to comments
* rerun tests
* refactor naming
* mobile: show group member images in the chat
* improve layout for group chat
* android: show member images in group chat
* do not repeat member name in group messages
* android: foreground service to receive messages
* android: fix duplicate chat (caused by persistent state of the service)
* option to turn off background service
* fix: foreground service failing to start when the new user is created
* remove unused background manager
* terminal: show version from .cabal file
* update welcome message
* terminal: helo on message quotes
* terminal: allow replies in groups without specifying a member
* core: update version to 1.3.3
* core: change quoted messages types/protocol
* remove comments and unused field
* rename CIQuote type
* change type for quote direction to allow unknown group member, use QuotedMsg to save received chat item
* change queries of quoted items when the sending group member is known
* refactor
* fix: make ciQuote polymorphic
* rfc for message replies and chat item references
* update replies rfc
* save received/sent shared message ids, migration and types for replies
* include reply/forward into MsgContent type
* add sharedMsgId to CIMeta
* save/get shared_msg_id to/from chat items table
* parameterize CIRef by chat type
* add CIRef to ChatItem when it is read from the db
* terminal command to send message replies
* include quoted content into chat items
* quoted message direction in direct chats (TODO test)
* test for replies with quotes to group messages - own and others
* split MsgContainer from MsgContent
* make quoting usable in the terminal
* add formattedText to quotes
* rename migration
* update JSON encoding for MsgContainer
* allow quoted replies to messages from clients not supporting it/not sending msg IDs
* update rfc
* fix group replies
* add APISendMessageQuote and use it for terminal commands
* change how quoted messages are shown in groups
* filter contacts on connection status before broadcasting profile updates
* catch and report errors when notifying contacts about profile updates
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* use relative sizing when scaling the QR code
* linting
* properly implement image scaling
* remove extra horizontal padding
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* android: parse/serialize unknown chat items
* ios: more resilient decoding of MsgContent
* core: preserve JSON of unknown message content type in MCUknown, so it can be parsed once it is supported by the client
* android: refactor modal views without navigation controller
* refactor navigation
* make alert manager global
* disable CRPendingSubSummary in terminal, hamburger menu instead of gear
* minimal implementation of notifications and broken framework for background check for messages
* linting and need different id to have multiple messages
* working notification on new messages
* add autocancel to notifications
* add rudimentary linking to chat from notification
* group notifications from the same chat
* clarify comment
* revert to working version
* refactor
* minors
* two channels, silent and shouty
* rudimentary state control for notifications
* check if running in foreground
* more elegant solution to don't notify if in chat
* tidy up DisposableEffect use
* change message notification priority to high
* nuke opt-ins
* navigation via notification occasionally works with race condition (WIP)
* notification navigation is working; remove chat list/view from navigation; refactor ChatListNavLinkView
* group all simplex notifications, only show the latest message per chat, notification icons
* increase time to 30 sec
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* asynchronously subscribe to user connections
* send subscription status summaries to view/api
* refactor
* add help messages in summaries
* update simplexmq
* rename config field
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* bigger fonts, text entry layout
* resize scroll area when keyboard appears; automatically scroll on new messages
* fix message entry in dark mode
* imporove console layout
* fix chat info with dark mode
* fix typo
* clean up
* remove unused time formatter
* initial attempt -- not recomposing
* change to mutable state, still not working
* two state works, why not three?
* fix so we actually change state
* remove unnecessary brackets
* refactor
* using Boolean? for userCreated
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* android: update user profile view logic
* indentation
* format
* UserProfileView
* remove prints
* empty line
* undo format
* change by value
* separate layout
* layout
* unconditionally editProfile = false
* add header and close button to profile page, add links to "settings"
* use generic navigate in settings, remove terminal button from the list of chats
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* simple case
* version almost working with true links
* show alerts in imperative way, like they were meant to
* connecting via links works
* add error handling to connections
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* initial restyling:
* polish styling a little
* lint
* more linting
* add dependency
* add time to messages when they exist
* if no chat items show time from time chat created
* playing with colours
* rename shared colour
* flip title text colour in dark mode
* update model when messages arrive
* update chat in the list when message is added
* copy methods with optional parameters
* use data classes to have pre-defined copy methods
* view placeholders for chats list and chat views
* classes for chats
* set the user to the model
* use Long for IDs
* chats/messages API (not working yet)
* android api works
* line breaks
* new compose project
* classes for chat command and response
* use val with get() for commands and responses
* chat model
* initial jetpack compose set up
* wire it up with chat
* first ability to send and receive messages
* refactor model/controller interface
* JSON samples
* terminal view with items
* playing around with json
* JSON serialization works
* parsing API responses in the terminal
* add subclass for contactSubscribed reponse
* remove android-poc
* remove JSON example
Co-authored-by: IanRDavies <ian_davies_@hotmail.co.uk>
* light github image for dark mode
* show message received status, remove chevrons in chat list
* show unread message status
* add message send error mark
* refactor alerts to use AlertManager
* show alert message on tapping undelivered message, simplify text-only alerts
* receiving messages in the background and sending local notifications
* show notifications in foreground and background
* presentation logic for notification options when app is in the foreground
* background refresh works
* remove async dispatch
* updated text items
* update version
* fix JSON parsing in CIDirection, refactor data samples
* show group member in received messages and chat preview
* use profile displayName instead of localDisplayName, do not show fullName if it is the same as displayName
* add chat items migration
* chat and chat items types
* queries draft
* ChatInfo with optional ChatItem
* schema adjustments
* flat schema and queries
* refactor ChatResponse using ChatItem types
* schema adjustments
* refactor GroupInfo to include GroupMember of the user
* remove Message
* createNewChatItem, sendDirectChatItem
* refactor to use GroupInfo in Chat type and all ChatResponses
* replace ContactName with Contact in some ChatResponse constructors
* remove Group selectors
* minor correction
* refactor
* refactor 2
* nullable created_by_msg_id
* remove normalized schema and queries
* ON DELETE CASCADE / SET NULL
* CIContent to Text
* files chat_item_id
* fix
* apply ciContentToText
* queries folder
* refactor
* moar refactor
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* Adds preliminary flake
This nix flake should be enough to try and build an android library.
* add sha256map
* bump
* bump index-state
Co-authored-by: Moritz Angermann <moritz.angermann@gmail.com>
* started chat model
* refactor processing commands and UI events
* message chat event processing
* groups: delayed delivery of messages and introductions to announced members (#217)
* combine migrations, rename fields
* show all view messages vis ChatResponse type
* serialize chat response
* update C api
* remove unused extensions, fix typos
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com>
* initial mobile app design draft
* add proposals
* xcode project
* refactor function to send to view as parameter
* export C interface
* remove unused files
* run chat from chatInit
* split chatStart to a separate function
* replace file-embed with QQ
* add mobile views
* server using IP address
* pass dbFilePrefix as parameter to chatInit
* comment on enabling logging
* fix mobile db config
* update C API, make user non-optional in ChatController
* restore SMP server addresses
* revert the change in the tests
* flip dependency - now Controller depends on Terminal
* make ChatController independent of terminal package
* fix Main.hs
* add iOS .gitignore
* refactor Simplex.Chat.Terminal
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com>
* blog: v1 release notes
* Update 20220112-simplex-chat-v1-released.md (#181)
* Update 20220112-simplex-chat-v1-released.md (#183)
updated intro and "journalist" description.
* add blog posts
* make corrections to v1 blog (#188)
* update 20210512-simplex-chat-terminal-ui.md (#192)
* Update 20210512-simplex-chat-terminal-ui.md
* Update 20210914-simplex-chat-v0.4-released.md
* Update 20210914-simplex-chat-v0.4-released.md
* update blog post
* add blog toc and old post
Co-authored-by: Mark Aleksander Hil <32651095+markaleksanderh@users.noreply.github.com>
Co-authored-by: Rob Chandhok <rob@chandhok.net>
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com>
* started chat protocol
* text message example
* events json
* same style comments
* jsonc
* num for rendering
* try to fix comment rendering
* revert num
* chat protocol: make msg params closer to types
* AppMessage type
* combine new and old simplexmq dependencies
* json parsers
* version-compatible types for connection requests
* more parsers
* remove import
* decode/encode from/to AppMessage
* make group invitation a property in params
* switch chat to the new agent
* remove "compatibility" attempt
* new JSON encoding for chat messages
* simplexmq from github
* update MsgContent name
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com>
* naming; full names on start for groups
* allow to re-add member
* save and reuse connection request
* TODO
* wording
* index
* user id
* revert to listToMaybe . map fromOnly
* add to test
* fix null conversion
* Update src/Simplex/Chat.hs
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* Update src/Simplex/Chat.hs
* fix
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* groups when in status invited - list as invitations on /gs
* don't list on start
* test
* refactor
* getUserGroupDetails
* update simplexmq to 0.5.2, update resolver
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com>
* update for ConectionMode parameters
* update with CONF notification and different ConnectionRequest types
* high level flow for contact requests, add x.con to chat protocol
* store functions for user contact links and contact requests
* contact links work
* subscribe to user contact link connection
* subscribe to user contact address: messages
* send rejectContact to the agents when rejected in chat
* user contact link (address) test
* Update src/Simplex/Chat/View.hs
* Update tests/ChatTests.hs
* user address help, fix tests
* delete connection requests when contact link deleted
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com>
* Add /version and /v flags
* Move version info from C Chat.Help to Chat.View
* Move version string, use it in Main startup
* use "SimpleX Chat" consistently
Co-authored-by: TheTaoOfSu <TheTaoOfSu@protonmail.com>
Added clarification that you are able to create multiple invitations by entering /connect multiple times without invalidating the previously created invitations.
* add sender/recipient info to file types
* send file to group (WIP)
* send file to group, test
* show file status when sending file to group
* notification when cancelled sending to group, remove chunks when file complete or canceleld
* schema for sending files
* send file "invitation"
* receive file "invitation"
* send/receive file flow (with stubs)
* update simplexmq
* send and receive the file (WIP - only the first chunk)
* sending and receiving file works (but it is slow)
* use correct terminal output for file sending/receiving
* improve file transfer, support cancellation
* command to show file transfer status and progress
* file transfer tests
* resume file transfer on restart (WIP)
* stabilize test of recipient cancelling file transfer
* trying to improve file transfer on restart
* update SMP block size and file chunk size
* acquire agent lock before chat lock to test whether it avoids deadlock
* fix resuming sending file on client restart
* manual message ACK (prevents losing messages between agent and chat client and stabilizes resuming file reception after restart)
* do NOT send file chunk after receiving it before it is appended to the file
* update file chunk size for SMP block size 8192 (set in smpDefaultConfig)
* save received files to ~/Downloads folder by default; create empty file when file is accepted
* keep file handle used to create empty file
* check message integrity
* fix trying to resume sending file when it was not yet accepted
* fix subscribing to pending connections on start
* update simplexmq (fixes smp-server syntax parser)
* escape backtick, backslash, double quotes wsl/win
* remove quotes, backtick from win notifications to prevent chat from crashing
* put notification title and text in single quotes and escape single quotes inside
* escape notifications for mac (draft)
* add replaceAll func
* remove unused import
* imports
* refactor replaceAll
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
* TMVar lock to avoid subscriber and client processing in parallel, fix the test
* run SMP server as part of the test
* stabilize tests
* update simplexmq
* test: stabilize getting invitation from terminal
* remove unused import
* simplify test
* remove group member
* leave group, fix remove member, tests for leave group/remove member
* delete group with test
* prevent contact deletion error when it is a group member
* support inviting the group member who left or was removed
* use small retry interval in the tests
* test multiline outputs
* chat commands to list members and to quit chat
* merge profiles using probe
* merge contacts connected to the same user based on successful profile probe
* delete display name after merging contacts
* probe: rename "existing" contacts to "matching"
* add category and local display name to group members, extend member status
* additional chat commands, serialization
* parse all chat messages
* draft group protocol implementation
* group protocol: connect new member to existing members (TODO fix race condition with contact connection)
* send/receive group messages (race condition still there - the 3rd member cannot send either group or direct messages to the 2nd member - CONN SIMPLEX)
* send x.grp.mem.info and x.ok in SMP confirmation
* fix host user adding new member, update simplexmq to fix sqlite concurrency, remove logs, make # optional in chat commands
* more precise view messages about members joining and connecting
* track connection status; only send messages to active members (TODO change to current members); group name autocomplete after joining the group
* track via which group the contact was added; show only one message when a contact fully connected; group tests
* test sending messages to the new direct contacts created via the group
* update simplexmq to include .cabal file
* remove unused import
* create group after invitation
* add group invitation to db, show sent and received group invitations
* test creating group and sending invitation
* establish group connections (WIP)
* connect user to the inviter, notification, member classification
* test adding same contact, add display_names table and functions
* rename display_name -> full_name
* use shared namespace for usernames, contact names and group names
* create group
* add user as member, store methods to get group and to create group member
* add group member and send member invitation
* fix ci: use simplexmq from github
* chat protocol: create SMP agent connection when inviting member
* update protocol, started group invitation receiving
* update readme with the disclaimer on encryption design and explanation of the network topology
* corrections
* remove old disclaimer
Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com>
* establish connection using user profiles (TODO: delete contact and send message)
* delete contact and send message with the updated schema
* comment
* refactor, remove old code
* chat types, chat protocol syntax idea
* chat message syntax, raw message type
* chat message format and parsing
* raw chat message parsing test
* add message parsing tests
* interpret RawChatMessage
* use chat message format when sending messages
* save contacts and related connections to DB (WIP)
* use contacts in all chat commands (add, connect, send, delete)
* use contacts when receiving messages and notifications
* handle contact not found error
* automatically accept connection when CONF is received from the agent
# * In powershell multiline commands do not fail if individual commands fail - https://github.community/t/multiline-commands-on-windows-do-not-fail-if-individual-commands-fail/16753
# * And GitHub Actions does not support parameterizing shell in a matrix job - https://github.community/t/using-matrix-to-specify-shell-is-it-possible/17065
if:(github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request'
# Beta Release
uses:cla-assistant/github-action@v2.1.3-beta
env:
GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}
# the below token should have repo scope and must be manually added by you in the repository's secret
#below are the optional inputs - If the optional inputs are not given, then default values will be taken
#create-file-commit-message: 'For example: Creating file for storing CLA Signatures'
#signed-commit-message: 'For example: $contributorName has signed the CLA in #$pullRequestNo'
#custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign'
#custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA'
#custom-allsigned-prcomment: 'pull request comment when all contributors has signed, defaults to **CLA Assistant Lite bot** All Contributors have signed the CLA.'
#lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
#use-dco-flag: true - If you are using DCO instead of CLA
SimpleX Chat is the first communication platform that has no user profile IDs of any kind, not even random numbers. Not only it has no access to your messages (thanks to open-source double-ratchet end-to-end encryption protocol and additional encryption layers), it also has no access to your profile and contacts - we cannot observe your connections graph.
If you believe that some of the clauses in this document are not aligned with our mission or principles, please raise it with us via [email](chat@simplex.chat) or [chat](https://simplex.chat/contact#/?v=1&smp=smp%3A%2F%2FPQUV2eL0t7OStZOoAsPEV2QYWt4-xilbakvGUGOItUo%3D%40smp6.simplex.im%2FK1rslx-m5bpXVIdMZg9NLUZ_8JBm8xTt%23%2F%3Fv%3D1%26dh%3DMCowBQYDK2VuAyEALDeVe-sG8mRY22LsXlPgiwTNs9dbiLrNuA7f3ZMAJ2w%253D%26srv%3Dbylepyau3ty4czmn77q4fglvperknl4bi2eb2fdy2bh4jxtf32kf73yd.onion).
## Privacy Policy
SimpleX Chat Ltd. ("SimpleX Chat") uses the best industry practices for security and end-to-end encryption to provide secure end-to-end encrypted messaging via private connections. SimpleX Chat is built on top of SimpleX messaging and application platform that uses a new message routing protocol that allows establishing private connection without having any kind of addresses that identify its users - we don't use emails, phone numbers, usernames, identity keys or any other user identifiers to pass messages between the users.
SimpleX Chat security audit was performed in October 2022 by [Trail of Bits](https://www.trailofbits.com/about), and most fixes were released in v4.2.0 – see [the announcement](./blog/20221108-simplex-chat-v4.2-security-audit-new-website.md).
### Information you provide
We do not store user profiles. The profile you create in the app is local to your device. When you create a user profile, no records are created on our servers, and we have no access to any part of your profile information, and even to the fact that you created a profile - it is a local record stored only on your device. That means that if you delete the app, and have no backup, you will permanently lose all the data and the private connections you create with other users.
Messages. SimpleX Chat cannot decrypt or otherwise access the content or even size of your messages (each message is padded to a fixed size of 16kb). SimpleX Chat temporarily stores end-to-end encrypted messages on its servers for delivery to the devices that are offline, these messages are permanently removed as soon as they are delivered. Your message history is stored only on your own devices.
Connections with other users. When you create a connection with another user, two messaging queues (you can think about them as about mailboxes) are created on our servers, or on the servers that you configured in the app, in case it allows such configuration (SimpleX uses separate queues for direct and response messages, that the client applications prefer to create on two different servers, in case you have more than one server configured in the app, which is the default). At the time of updating this document all our client applications allow configuring the servers. Our servers do not store information about which queues are linked to your profile on the device, and they do not collect any information that would allow us to establish that these queues are related to your device or your profile - the access to each queue is authorized by a set of anonymous unique cryptographic keys, different for each queue, and separate for sender and recipient of the messages. The exception to that is when you choose to use instant push notifications in our iOS app, because the design of push notifications requires storing the device token on notification server, and the server can observe how many messaging queues your device uses, and approximate how many messages are sent to each queue. It does not allow though to determine the actual addresses of these queues, as a separate address is used to subscibe to the notifications (unless notification and messaging servers exchange information), and who, or even how many contacts, send messages to you, as notifications are delivered to your device end-to-end encrypted by the messaging servers. It also does not allow to see message content or sizes, as the actual messages are not sent via the notification service, only the fact that the message is available and where it can be received from (the latter information is encrypted, so that the notification server cannot see it). You can read more about the design of iOS push notifications [here](https://simplex.chat/blog/20220404-simplex-chat-instant-notifications.html#our-ios-approach-has-one-trade-off).
Additional technical information can be stored on our servers, including randomly generated authentication tokens, keys, push tokens, and other material that is necessary to transmit messages. SimpleX Chat limits this additional technical information to the minimum required to operate the Services.
User Support. If you contact SimpleX Chat any personal data you may share with us is kept only for the purposes of researching the issue and contacting you about your case. We recommend contacting support [via chat](https://simplex.chat/contact#/?v=1&smp=smp%3A%2F%2FPQUV2eL0t7OStZOoAsPEV2QYWt4-xilbakvGUGOItUo%3D%40smp6.simplex.im%2FK1rslx-m5bpXVIdMZg9NLUZ_8JBm8xTt%23%2F%3Fv%3D1%26dh%3DMCowBQYDK2VuAyEALDeVe-sG8mRY22LsXlPgiwTNs9dbiLrNuA7f3ZMAJ2w%253D%26srv%3Dbylepyau3ty4czmn77q4fglvperknl4bi2eb2fdy2bh4jxtf32kf73yd.onion), when it is possible.
### Information we may share
We operate our Services using third parties. While we do not share any user data, these third party may access the encrypted user data as it is stored or transmitted via our servers.
We use Third party to provide email services - if you ask for support via email, your and SimpleX Chat email providers may access these emails according their privacy policies and terms of service.
The cases when SimpleX Chat may need to share the data we temporarily store on the servers:
- To meet any applicable law, regulation, legal process or enforceable governmental request.
- To enforce applicable Terms, including investigation of potential violations.
- To detect, prevent, or otherwise address fraud, security, or technical issues.
- To protect against harm to the rights, property, or safety of SimpleX Chat, our users, or the public as required or permitted by law.
At the time of updating this document, we have never provided or have been requested the access to our servers or any information from our servers by any third parties. If we are ever requested to provide such access or information, we will follow the due legal process.
### Updates
We will update this privacy policy as needed so that it is current, accurate, and as clear as possible. Your continued use of our Services confirms your acceptance of our updated Privacy Policy.
Please also read our Terms of Service.
If you have questions about our Privacy Policy please contact us at chat@simplex.chat.
## Terms of Service
You accept to our Terms of Service ("Terms") by installing or using any of our apps or services ("Services").
**Minimal age**. You must be at least 13 years old to use our Services. The minimum age to use our Services without parental approval may be higher in your country.
**Accessing the servers**. For the efficiency of the network access, the apps access all queues you create on any server via the same network (TCP/IP) connection. Our servers do not collect information about which queues were accessed via the same connection, so we do cannot establish which queues belong to the same users. Whoever might observe your network traffic would know which servers you use, and how much data you send, but not to whom it is sent - the data that leaves the servers is always different from the data they receive - there are no identifiers or cyphertext in common. Please refer to our [technical design document](https://github.com/simplex-chat/simplexmq/blob/master/protocol/overview-tjr.md) for more information about our privacy model and known security and privacy risks.
**Privacy of user data**. We do not retain any data we transmit for any longer than necessary to provide the Services. We only collect aggregate statistics across all users, not per user - we do not have information about how many people use SimpleX Chat (we only know an approximate number of app installations and the aggregate traffic through our servers). In any case, we do not and will not sell or in any way monetize user data.
**Operating our services**. For the purpose of operating our Services, you agree that your end-to-end encrypted messages are transferred via our servers in the United Kingdom, the United States and other countries where we have or use facilities and service providers or partners.
**Software**. You agree to downloading and installing updates to our Services when they are available; they would only be automatic if you configure your devices in this way.
**Traffic and device costs**. You are solely responsible for the traffic and device costs on which you use our Services, and any associated taxes.
**Legal and acceptable usage**. You agree to use our Services only for legal and acceptable purposes. You will not use (or assist others in using) our Services in ways that: 1) violate or infringe the rights of SimpleX Chat, our users, or others, including privacy, publicity, intellectual property, or other proprietary rights; 2) involve sending illegal or impermissible communications, e.g. spam.
**Damage to SimpleX Chat**. You must not (or assist others to) access, use, modify, distribute, transfer, or exploit our Services in unauthorized manners, or in ways that harm SimpleX Chat, our Services, or systems. For example, you must not 1) access our Services or systems without authorization, other than by using the apps; 2) disrupt the integrity or performance of our Services; 3) collect information about our users in any manner; or 4) sell, rent, or charge for our Services.
**Keeping your data secure**. SimpleX Chat is the first messaging platform that is 100% private by design - we neither have ability to access your messages, nor we have information about who you communicate with. That means that you are solely responsible for keeping your device and your user profile safe and secure. If you lose your phone or remove the app, you will not be able to recover the lost data, unless you made a back up.
**Storing the messages on the device**. Currently the messages are stored in the database on your device without encryption. It means that if you make a backup of the app and store it unecrypted, the backup provider may be able to access the messages.
**No Access to Emergency Services**. Our Services do not provide access to emergency service providers like the police, fire department, hospitals, or other public safety organizations. Make sure you can contact emergency service providers through a mobile, fixed-line telephone, or other service.
**Third-party services**. Our Services may allow you to access, use, or interact with third-party websites, apps, content, and other products and services. When you use third-party services, their terms and privacy policies govern your use of those services.
**Your Rights**. You own the mesasges and information you transmit through our Services. Your recipients are able to retain the messages you receive from you; there is no technical ability to delete data from their devices.
**License**. SimpleX Chat grants you a limited, revocable, non-exclusive, and non-transferable license to use our Services in accordance with these Terms. The source-code of services is available and can be used under [AGPL v3 licence](https://github.com/simplex-chat/simplex-chat/blob/stable/LICENSE)
**SimpleX Chat Rights**. We own all copyrights, trademarks, domains, logos, trade secrets, and other intellectual property rights associated with our Services. You may not use our copyrights, trademarks, domains, logos, and other intellectual property rights unless you have our written permission, and unless under an open-source license distributed together with the source code. To report copyright, trademark, or other intellectual property infringement, please contact chat@simplex.chat.
**Disclaimers**. YOU USE OUR SERVICES AT YOUR OWN RISK AND SUBJECT TO THE FOLLOWING DISCLAIMERS. WE PROVIDE OUR SERVICES ON AN “AS IS” BASIS WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, NON-INFRINGEMENT, AND FREEDOM FROM COMPUTER VIRUS OR OTHER HARMFUL CODE. SIMPLEX DOES NOT WARRANT THAT ANY INFORMATION PROVIDED BY US IS ACCURATE, COMPLETE, OR USEFUL, THAT OUR SERVICES WILL BE OPERATIONAL, ERROR-FREE, SECURE, OR SAFE, OR THAT OUR SERVICES WILL FUNCTION WITHOUT DISRUPTIONS, DELAYS, OR IMPERFECTIONS. WE DO NOT CONTROL, AND ARE NOT RESPONSIBLE FOR, CONTROLLING HOW OR WHEN OUR USERS USE OUR SERVICES. WE ARE NOT RESPONSIBLE FOR THE ACTIONS OR INFORMATION (INCLUDING CONTENT) OF OUR USERS OR OTHER THIRD PARTIES. YOU RELEASE US, AFFILIATES, DIRECTORS, OFFICERS, EMPLOYEES, PARTNERS, AND AGENTS ("SIMPLEX PARTIES") FROM ANY CLAIM, COMPLAINT, CAUSE OF ACTION, CONTROVERSY, OR DISPUTE (TOGETHER, "CLAIM") AND DAMAGES, KNOWN AND UNKNOWN, RELATING TO, ARISING OUT OF, OR IN ANY WAY CONNECTED WITH ANY SUCH CLAIM YOU HAVE AGAINST ANY THIRD PARTIES.
**Limitation of liability**. THE SIMPLEX PARTIES WILL NOT BE LIABLE TO YOU FOR ANY LOST PROFITS OR CONSEQUENTIAL, SPECIAL, PUNITIVE, INDIRECT, OR INCIDENTAL DAMAGES RELATING TO, ARISING OUT OF, OR IN ANY WAY IN CONNECTION WITH OUR TERMS, US, OR OUR SERVICES, EVEN IF THE SIMPLEX PARTIES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. OUR AGGREGATE LIABILITY RELATING TO, ARISING OUT OF, OR IN ANY WAY IN CONNECTION WITH OUR TERMS, US, OR OUR SERVICES WILL NOT EXCEED ONE DOLLAR ($1). THE FOREGOING DISCLAIMER OF CERTAIN DAMAGES AND LIMITATION OF LIABILITY WILL APPLY TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW. THE LAWS OF SOME JURISDICTIONS MAY NOT ALLOW THE EXCLUSION OR LIMITATION OF CERTAIN DAMAGES, SO SOME OR ALL OF THE EXCLUSIONS AND LIMITATIONS SET FORTH ABOVE MAY NOT APPLY TO YOU. NOTWITHSTANDING ANYTHING TO THE CONTRARY IN OUR TERMS, IN SUCH CASES, THE LIABILITY OF THE SIMPLEX PARTIES WILL BE LIMITED TO THE EXTENT PERMITTED BY APPLICABLE LAW.
**Availability**. Our Services may be interrupted, including for maintenance, upgrades, or network or equipment failures. We may discontinue some or all of our Services, including certain features and the support for certain devices and platforms, at any time.
**Resolving disputes**. You agree to resolve any Claim you have with us relating to or arising from our Terms, us, or our Services in the courts of England and Wales. You also agree to submit to the personal jurisdiction of such courts for the purpose of resolving all such disputes. The laws of England govern our Terms, as well as any disputes, whether in court or arbitration, which might arise between SimpleX Chat and you, without regard to conflict of law provisions.
**Changes to the terms**. SimpleX Chat may update the Terms from time to time. Your continued use of our Services confirms your acceptance of our updated Terms and supersedes any prior Terms. You will comply with all applicable export control and trade sanctions laws. Our Terms cover the entire agreement between you and SimpleX Chat regarding our Services. If you do not agree with our Terms, you should stop using our Services.
**Enforcing the terms**. If we fail to enforce any of our Terms, that does not mean we waive the right to enforce them. If any provision of the Terms is deemed unlawful, void, or unenforceable, that provision shall be deemed severable from our Terms and shall not affect the enforceability of the remaining provisions. Our Services are not intended for distribution to or use in any country where such distribution or use would violate local law or would subject us to any regulations in another country. We reserve the right to limit our Services in any country. If you have specific questions about these Terms, please contact us at chat@simplex.chat.
**Ending these Terms**. You may end these Terms with SimpleX Chat at any time by deleting SimpleX Chat app(s) from your device and discontinuing use of our Services. The provisions related to Licenses, Disclaimers, Limitation of Liability, Resolving dispute, Availability, Changes to the terms, Enforcing the terms, and Ending these Terms will survive termination of your relationship with SimpleX Chat.
[](https://www.reddit.com/r/SimpleXChat)
[](https://mastodon.social/@simplex)
See [simplex.chat](https://simplex.chat) website for chat demo and the explanations of the system and how SMP protocol works.
- 🖲 Protects your messages and metadata - who you talk to and when.
- 🔐 Double ratchet end-to-end encryption, with additional encryption layer.
- 📱 Mobile apps for Android ([Google Play](https://play.google.com/store/apps/details?id=chat.simplex.app), [APK](https://github.com/simplex-chat/simplex-chat/releases/latest/download/simplex.apk)) and [iOS](https://apps.apple.com/us/app/simplex-chat/id1605771084).
- 🚀 [TestFlight preview for iOS](https://testflight.apple.com/join/DWuT2LQu) with the new features 1-2 weeks earlier - **limited to 10,000 users**!
- 🖥 Available as a terminal (console) [app / CLI](#zap-quick-installation-of-a-terminal-app) on Linux, MacOS, Windows.
SimpleX chat prototype is a "thin" terminal UI on top of [SimpleXMQ](https://github.com/simplex-chat/simplexmq) message broker, that uses [SMP protocol](https://github.com/simplex-chat/simplexmq/tree/master/protocol) and SMP agent protocol.
**NEW**: Security audit by [Trail of Bits](https://www.trailofbits.com/about), the [new website](https://simplex.chat) and v4.2 released! [See the announcement](./blog/20221108-simplex-chat-v4.2-security-audit-new-website.md)
These features are implemented:
- 1-to-1 chat with multiple people in the same terminal window.
- auto-populated recipient name - just type your messages to reply to the sender.
- default server is available to use - `smp1.simplex.im:5223` - you can deploy your own server (`smp-server` executable in [simplexmq](https://github.com/simplex-chat/simplexmq) repo).
- no global identity or any names visible to the server(s) - for the full privacy of your contacts and conversations.
- E2E encryption, with RSA public key that has to be passed out-of-band (see below).
- message signing and verification with automatically generated RSA keys.
- message integrity validation (via including the digests of the previous messages).
- authentication of each command/message by SMP servers with automatically generated RSA key pairs.
- TCP transport encryption using SMP transport protocol.
## Contents
RSA keys are not used as identity, they are randomly generated for each contact. 2048 bit keys are used, it can be changed to 4096-bit in code via [rsaKeySize setting](https://github.com/simplex-chat/simplex-chat/blob/master/apps/dog-food/Main.hs).
- [Why privacy matters](#why-privacy-matters)
- [SimpleX approach to privacy and security](#simplex-approach-to-privacy-and-security)
The chat client is stable, but it is quite new and unaudited, so you probably should NOT use it yet for high security communications - unless you know what you are doing.
## Why privacy matters
## SimpleX chat roadmap for 2021-22
Everyone should care about privacy and security of their communications - innocuous conversations can put you in danger even if there is nothing to hide.
1. Switch to application level chat protocol. This will allow to separate physical server connection management from logical chat contacts, and to support all common chat functions.
2. SMP queue redundancy and rotation in SMP agent protocol.
3. Symmetric groups support in SMP agent protocol, as a foundation for chat groups.
4. Delivery confirmation in SMP agent protocol.
5. Multi-agent/device data synchronisation - to use chat on multiple devices.
6. Synchronous streams support in SMP and SMP agent protocols, to support file transfer.
7. Terminal chat UI and mobile apps.
8. Scripts for simple SMP server deployment to hosting providers: Linode, Digital Ocean and Heroku.
9. Public broadcast channels.
10. Optional public contact/group addresses using DNS to establish connections, but not using it to send and receive messages - in this way you will keep all your contacts and groups even if you lose the control of the domain.
One of the most shocking stories is the experience of [Mohamedou Ould Salahi](https://en.wikipedia.org/wiki/Mohamedou_Ould_Slahi) that he wrote about in his memoir and that is shown in The Mauritanian movie. He was put into Guantanamo camp, without trial, and was tortured there for 15 years after a phone call to his relative in Afghanistan, under suspicion of being involved in 9/11 attacks, even though he lived in Germany for the 10 years prior to the attacks.
## Installing the chat client
It is not enough to use an end-to-end encrypted messenger, we all should use the messengers that protect the privacy of our personal networks - who we are connected with.
## SimpleX approach to privacy and security
### Complete privacy of your identity, profile, contacts and metadata
**Unlike any other existing messaging platform, SimpleX has no identifiers assigned to the users** - not even random numbers. This protects the privacy of who are you communicating with, hiding it from SimpleX platform servers and from any observers. [Read more](./docs/SIMPLEX.md#full-privacy-of-your-identity-profile-contacts-and-metadata).
### The best protection against spam and abuse
As you have no identifier on SimpleX platform, you cannot be contacted unless you share a one-time invitation link or an optional temporary user address. [Read more](./docs/SIMPLEX.md#the-best-protection-against-spam-and-abuse).
### Complete ownership, control and security of your data
SimpleX stores all user data on client devices, the messages are only held temporarily on SimpleX relay servers until they are received. [Read more](./docs/SIMPLEX.md#complete-ownership-control-and-security-of-your-data).
### Users own SimpleX network
You can use SimpleX with your own servers and still communicate with people using the servers that are pre-configured in the apps or any other SimpleX servers. [Read more](./docs/SIMPLEX.md#users-own-simplex-network).
## Frequently asked questions
1._How SimpleX can deliver messages without any user identifiers?_ See [v2 release announcement](./blog/20220511-simplex-chat-v2-images-files.md#the-first-messaging-platform-without-user-identifiers) explaining how SimpleX works.
2._Why should I not just use Signal?_ Signal is a centralized platform that uses phone numbers to identify its users and their contacts. It means that while the content of your messages on Signal is protected with robust end-to-end encryption, there is a large amount of meta-data visible to Signal - who you talk with and when.
3._How is it different from Matrix, Session, Ricochet, Cwtch, etc., that also don't require user identities?_ Although these platforms do not require a _real identity_, they do rely on anonymous user identities to deliver messages – it can be, for example, an identity key or a random number. Using a persistent user identity, even anonymous, creates a risk that user's connection graph becomes known to the observers and/or service providers, and it can lead to de-anonymizing some users. If the same user profile is used to connect to two different people via any messenger other than SimpleX, these two people can confirm if they are connected to the same person - they would use the same user identifier in the messages. With SimpleX there is no meta-data in common between your conversations with different contacts - the quality that no other messaging platform has.
## News and updates
Recent updates:
[Feb 04, 2023. v4.5 released - with multiple user profiles, message draft, transport isolation and Italian interface](./blog/20230204-simplex-chat-v4-5-user-chat-profiles.md).
[Jan 03, 2023. v4.4 released - with disappearing messages, "live" messages, connection security verifications, GIFs and stickers and with French interface language](./blog/20230103-simplex-chat-v4.4-disappearing-messages.md).
[Dec 06, 2022. November reviews and v4.3 released - with instant voice messages, irreversible deletion of sent messages and improved server configuration](./blog/20221206-simplex-chat-v4.3-voice-messages.md).
[Nov 08, 2022. Security audit by Trail of Bits, the new website and v4.2 released](./blog/20221108-simplex-chat-v4.2-security-audit-new-website.md).
[Sep 28, 2022. v4.0: encrypted local chat database and many other changes](./blog/20220928-simplex-chat-v4-encrypted-database.md).
[All updates](./blog)
## Make a private connection
You need to share a link or scan a QR code (in person or during a video call) to make a connection and start messaging.
The channel through which you share the link does not have to be secure - it is enough that you can confirm who sent you the message and that your SimpleX connection is established.
Once the chat client is installed, simply run `simplex-chat` from your terminal.

Read more about [installing and using the terminal app](./docs/CLI.md).
## SimpleX Platform design
SimpleX is a client-server network with a unique network topology that uses redundant, disposable message relay nodes to asynchronously pass messages via unidirectional (simplex) message queues, providing recipient and sender anonymity.
Unlike P2P networks, all messages are passed through one or several server nodes, that do not even need to have persistence. In fact, the current [SMP server implementation](https://github.com/simplex-chat/simplexmq#smp-server) uses in-memory message storage, persisting only the queue records. SimpleX provides better metadata protection than P2P designs, as no global participant identifiers are used to deliver messages, and avoids [the problems of P2P networks](./docs/SIMPLEX.md#comparison-with-p2p-messaging-protocols).
Unlike federated networks, the server nodes **do not have records of the users**, **do not communicate with each other** and **do not store messages** after they are delivered to the recipients. There is no way to discover the full list of servers participating in SimpleX network. This design avoids the problem of metadata visibility that all federated networks have and better protects from the network-wide attacks.
Only the client devices have information about users, their contacts and groups.
See [SimpleX whitepaper](https://github.com/simplex-chat/simplexmq/blob/stable/protocol/overview-tjr.md) for more information on platform objectives and technical design.
See [SimpleX Chat Protocol](./docs/protocol/simplex-chat.md) for the format of messages sent between chat clients over [SimpleX Messaging Protocol](https://github.com/simplex-chat/simplexmq/blob/stable/protocol/simplex-messaging.md).
## Privacy: technical details and limitations
SimpleX Chat is a work in progress – we are releasing improvements as they are ready. You have to decide if the current state is good enough for your usage scenario.
What is already implemented:
1. Instead of user profile identifiers used by all other platforms, even the most private ones, SimpleX uses pairwise per-queue identifiers (2 addresses for each unidirectional message queue, with an optional 3rd address for push notifications on iOS, 2 queues in each connection between the users). It makes observing the network graph on the application level more difficult, as for `n` users there can be up to `n * (n-1)` message queues.
2. End-to-end encryption in each message queue using [NaCl cryptobox](https://nacl.cr.yp.to/box.html). This is added to allow redundancy in the future (passing each message via several servers), to avoid having the same ciphertext in different queues (that would only be visible to the attacker if TLS is compromised). The encryption keys used for this encryption are not rotated, instead we are planning to rotate the queues. Curve25519 keys are used for key negotiation.
3. [Double ratchet](https://signal.org/docs/specifications/doubleratchet/) end-to-end encryption in each conversation between two users (or group members). This is the same algorithm that is used in Signal and many other messaging apps; it provides OTR messaging with forward secrecy (each message is encrypted by its own ephemeral key), break-in recovery (the keys are frequently re-negotiated as part of the message exchange). Two pairs of Curve448 keys are used for the initial key agreement, initiating party passes these keys via the connection link, accepting side - in the header of the confirmation message.
4. Additional layer of encryption using NaCL cryptobox for the messages delivered from the server to the recipient. This layer avoids having any ciphertext in common between sent and received traffic of the server inside TLS (and there are no identifiers in common as well).
5. Several levels of content padding to frustrate message size attacks.
6. Starting from v2 of SMP protocol (the current version is v4) all message metadata, including the time when the message was received by the server (rounded to a second) is sent to the recipients inside an encrypted envelope, so even if TLS is compromised it cannot be observed.
7. Only TLS 1.2/1.3 are allowed for client-server connections, limited to cryptographic algorithms: CHACHA20POLY1305_SHA256, Ed25519/Ed448, Curve25519/Curve448.
8. To protect against replay attacks SimpleX servers require [tlsunique channel binding](https://www.rfc-editor.org/rfc/rfc5929.html) as session ID in each client command signed with per-queue ephemeral key.
9. To protect your IP address all SimpleX Chat clients support accessing messaging servers via Tor - see [v3.1 release announcement](./blog/20220808-simplex-chat-v3.1-chat-groups.md) for more details.
10. Local database encryption with passphrase - your contacts, groups and all sent and received messages are stored encrypted. If you used SimpleX Chat before v4.0 you need to enable the encryption via the app settings.
11. Transport isolation - different TCP connections and Tor circuits are used for traffic of different user profiles, optionally - for different contacts and group member connections.
We plan to add soon:
1. Automatic message queue rotation. Currently the queues created between two users are used until the queue is manually changed by the user or contact is deleted. We are planning to add automatic queue rotation to make these identifiers temporary and rotate based on some schedule TBC (e.g., every X messages, or every X hours/days).
2. Local files encryption. Currently the images and files you send and receive are stored in the app unencrypted, you can delete them via `Settings / Database passphrase & export`.
3. Message "mixing" - adding latency to message delivery, to protect against traffic correlation by message time.
## For developers
You can:
- download the executable file built on Github CI
- build it from source
### Downloading the executable chat client
- use SimpleX Chat library to integrate chat functionality into your mobile apps.
- create chat bots and services in Haskell - see [simple](./apps/simplex-bot/) and more [advanced chat bot example](./apps/simplex-bot-advanced/).
- create chat bots and services in any language running SimpleX Chat terminal CLI as a local WebSocket server. See [TypeScript SimpleX Chat client](./packages/simplex-chat-client/) and [JavaScript chat bot example](./packages/simplex-chat-client/typescript/examples/squaring-bot.js).
- run [simplex-chat terminal CLI](./docs/CLI.md) to execute individual chat commands, e.g. to send messages as part of shell script execution.
You can download the executable binary file for your platform from the [latest stable release](https://github.com/simplex-chat/simplex-chat/releases) and make it executable:
If you are considering developing with SimpleX platform please get in touch for any advice and support.
- Linux and MacOS: `chmod +x <binary>; mv <binary> ~/.local/bin/dog-food` (or any other preferred location on PATH). On MacOS you need to [allow Gatekeeper to run it](https://support.apple.com/en-us/HT202491).
- Supporting the same profile on multiple devices.
- Desktop client.
- Privacy-preserving identity server for optional DNS-based contact/group addresses to simplify connection and discovery, but not used to deliver messages:
- keep all your contacts and groups even if you lose the domain.
- the server doesn't have information about your contacts and groups.
- Hosting server for large groups, communities and public channels.
- Message delivery relay for senders (to conceal IP address from the recipients' servers and to reduce the traffic).
- High capacity multi-node SMP relays.
#### Using Docker
## Join a user group
On Linux, you can build the chat executable using [docker build with custom output](https://docs.docker.com/engine/reference/commandline/build/#custom-build-outputs):
You can join an English-speaking group if you want to ask any questions: [#SimpleX-Group-2](https://simplex.chat/contact#/?v=1-2&smp=smp%3A%2F%2Fhpq7_4gGJiilmz5Rf-CswuU5kZGkm_zOIooSw6yALRg%3D%40smp5.simplex.im%2FQP8zaGjjmlXV-ix_Er4JgJ0lNPYGS1KX%23%2F%3Fv%3D1-2%26dh%3DMCowBQYDK2VuAyEApAgBkRZ3x12ayZ7sHrjHQWNMvqzZpWUgM_fFCUdLXwo%253D%26srv%3Djjbyvoemxysm7qxap7m5d5m35jzv5qq6gnlv7s4rsn7tdwwmuqciwpid.onion&data=%7B%22type%22%3A%22group%22%2C%22groupLinkId%22%3A%22xWpPXEZZsQp_F7vwAcAYDw%3D%3D%22%7D)
There are also several groups in languages other than English, that we have the apps interface translated into. These groups are for testing, and asking questions to other SimpleX Chat users. We do not always answer questions there, so please ask them in one of the English-speaking groups.
> **Please note:** If you encounter ``version `GLIBC_2.28' not found`` error, rebuild it with `haskell:8.8.4-stretch` base image (change it in your local [Dockerfile](Dockerfile)).
Join via the app to share what's going on and ask any questions!
```shell
curl -sSL https://get.haskellstack.org/ | sh
```
## Translate the apps
and build the project:
Thanks to our users and [Weblate](https://hosted.weblate.org/engage/simplex-chat/), SimpleX Chat apps are translated to many other languages. Join our translators to help SimpleX grow faster!
Run `dog-food` (as in "eating your own dog food"), or the downloaded file (if you did not move it to bin folder), to start the chat client.
Languages in progress: Chinese, Hindi, Czech, Japanese, Dutch and [many others](https://hosted.weblate.org/projects/simplex-chat/#languages). We will be adding more languages as some of the already added are completed – please suggest new languages, review the [translation guide](./docs/TRANSLATIONS.md) and get in touch with us!
By default, app data directory is created in the home directory (`~/.simplex`, or `%APPDATA%/simplex` on Windows), and SQLite database file `smp-chat.db` is initialized in it. The default SMP server is `smp1.simplex.im:5223#pLdiGvm0jD1CMblnov6Edd/391OrYsShw+RgdfR0ChA=` (base-64 encoded string after server port is the transport key digest) - it is pre-configured in the app.
## Contribute
To specify a different file path for the chat database use `-d` command line option:
We would love to have you join the development! You can contribute to SimpleX Chat with:
```shell
$ dog-food -d my-chat.db
```
- translate website homepage - there is a lot of content we would like to share, it would help to bring the new users.
- writing a tutorial or recipes about hosting servers, chat bot automations, etc.
- developing features - please connect to us via chat so we can help you get started.
If you deployed your own SMP server you can set client to use it via `-s` option:
Huge thank you to everybody who donated to SimpleX Chat!
The base-64 encoded string in server address is the digest of RSA transport handshake key that the server will generate on the first run and output its digest.
We are prioritizing users privacy and security - it would be impossible without your support.
You can still talk to people using default or any other server, it only affects the location of the message queue when you initiate the connection (and the reply queue can be on another server, as set by the other party's client).
Our pledge to our users is that SimpleX protocols are and will remain open, and in public domain, - so anybody can build the future implementations of the clients and the servers. We are building SimpleX platform based on the same principles as email and web, but much more private and secure.
Run `dog-food --help` to see all available options.
Your donations help us raise more funds – any amount, even the price of the cup of coffee, would make a big difference for us.
## Using chat client
It is possible to donate via:
Once chat client is started, use `/add <name1>` to create a new connection and generate an invitation to send to your contact via any other communication channel (`<name1>` - is any name you want to use for that contact).
- [GitHub](https://github.com/sponsors/simplex-chat) - it is commission-free for us.
- [OpenCollective](https://opencollective.com/simplex-chat) - it charges a commission, and also accepts donations in crypto-currencies.
- please let us know, via GitHub issue or chat, if you want to create a donation in some other cryptocurrency - we will add the address to the list.
Invitation has format `smp::<server>::<queue_id>::<rsa_public_key_for_this_queue_only>` - this needs to be shared with another party, via any other channel. This invitation can only be used once - even if this is intercepted, the attacker would not be able to use it to send you the messages via this queue once your contact confirms that the connection is established.
Thank you,
The party that received the invitation should use `/connect <name2> <invitation>` to accept the connection (`<name2>` is any name that the accepting party wants to use for you).
Evgeny
For example, if Alice and Bob want to chat, with Alice initiating, Alice would use [in her chat client]:
SimpleX Chat founder
```
/add bob
```
## Disclaimers
And then send the generated invitation to Bob out-of-band. Bob then would use [in his chat client]:
[SimpleX protocols and security model](https://github.com/simplex-chat/simplexmq/blob/master/protocol/overview-tjr.md) was reviewed, and had many breaking changes and improvements in v1.0.0.
```
/connect alice <alice's invitation>
```
The security audit was performed in October 2022 by [Trail of Bits](https://www.trailofbits.com/about), and most fixes were released in v4.2.0 – see [the announcement](./blog/20221108-simplex-chat-v4.2-security-audit-new-website.md).
They would then use `@<name> <message>` commands to send messages. One may also press Space or just start typing a message to send a message to the contact that was the last.
SimpleX Chat is still a relatively early stage platform (the mobile apps were released in March 2022), so you may discover some bugs and missing features. We would really appreciate if you let us know anything that needs to be fixed or improved.
If your contact is disconnected, restart the chat client - it may happen if you lose internet connection.
The default servers configured in the app are provided on the best effort basis. We are currently not guaranteeing any SLAs, although historically our servers had over 99.9% uptime each.
Use `/help` in chat to see the list of available commands.
We have never provided or have been requested access to our servers or any information from our servers by any third parties. If we are ever requested to provide such access or information, we will be following due legal process.
## Accessing chat history
We do not log IP addresses of the users and we do not perform any traffic correlation on our servers. If transport level security is critical you must use Tor or some other similar network to access messaging servers. We will be improving the client applications to reduce the opportunities for traffic correlation.
SimpleX chat stores all your contacts and conversations in the local database file, making it private and portable by design, fully owned and controlled by you.
Please read more in [Terms & privacy policy](./PRIVACY.md).
You can search your chat history via SQLite database file:
## Security contact
```
sqlite3 ~/.simplex/smp-chat.db
```
To report a security vulnerability, please send us email to chat@simplex.chat. We will coordinate the fix and disclosure. Please do NOT report security vulnerabilities via GitHub issues.
Now you can query `messages` table, for example:
```sql
select*frommessages
whereconn_alias=cast('alice'asblob)
andbodylike'%cats%'
orderbyinternal_iddesc;
```
> **Please note:** SQLite foreign key constraints are disabled by default, and must be **[enabled separately for each database connection](https://sqlite.org/foreignkeys.html#fk_enable)**. The latter can be achieved by running `PRAGMA foreign_keys = ON;` command on an open database connection. By running data altering queries without enabling foreign keys prior to that, you may risk putting your database in an inconsistent state.
Please treat any findings of possible traffic correlation attacks allowing to correlate two different conversations to the same user, other than covered in [the threat model](https://github.com/simplex-chat/simplexmq/blob/stable/protocol/overview-tjr.md#threat-model), as security vulnerabilities, and follow this disclosure process.
- [Communication between SMP agents](#communication-between-smp-agents)
- [Message syntax](#messages-between-smp-agents)
- [HELLO message](#hello-message)
- [REPLY message](#reply-message)
- [MSG message](#msg-message)
- [SMP agent commands](#smp-agent-commands)
- [Client commands and server responses](#client-commands-and-server-responses)
- [NEW command and INV response](#new-command-and-inv-response)
- [JOIN command](#join-command)
- [CON notification](#con-notification)
- [SUB command](#sub-command)
- [SEND command and SENT response](#send-command-and-sent-response)
- [MSG notification](#msg-notification)
- [END notification](#end-notification)
- [OFF command](#off-command)
- [DEL command](#del-command)
- [Connection invitation](#connection-invitation)
## Abstract
The purpose of SMP agent protocol is to define the syntax and the semantics of communications between the client and the agent that connects to [SMP](./simplex-messaging.md) servers.
It provides:
- convenient protocol to create and manage a bi-directional (duplex) connection to the users of SMP agents consisting of two separate unidirectional (simplex) SMP queues, abstracting away multiple steps required to establish bi-directional connections.
- management of E2E encryption between SMP agents, generating ephemeral RSA keys for each connection.
- SMP command authentication on SMP servers, generating ephemeral RSA keys for each SMP queue.
- TCP transport handshake and encryption with SMP servers.
- validation of message integrity.
SMP agent protocols provides no encryption or any security on the client side - it is assumed that the agent is executed in the trusted and secure environment.
The future versions of this protocol could provide:
- managing redundant SMP queues with more than 1 queue in each direction.
- managing simple symmetric groups as a foundation for chat groups and device synchronization.
- agent cluster - synchronizing states of multiple agents.
- secure "synchronous" streams with symmetric message encryption and connection-level authentication (requires extending [SMP protocol](./simplex-messaging.md)) - it can be used, e.g., for file transfers.
## SMP agent
SMP agent is a client-side process or library that communicates via SMP servers using [simplex messaging protocol (SMP)](./simplex-messaging.md) with other SMP agents according to the commands received from its users. This protocol is a middle layer in SMP protocols stack (above SMP protocol but below any application level protocol) - it is intended to be used by client-side applications that need secure asynchronous bi-directional communication channels ("connections").
The agent must have a persistent storage to manage the states of known connections and of the client-side information of two SMP queues that each connection consists of, and also the buffer of the most recent messages. The number of the messages that should be stored is implementation specific, depending on the error management approach that the agent implements; at the very least the agent must store the hash and id of the last received message.
## SMP agent protocol components
SMP agent protocol has 3 main parts:
- the syntax and semantics of messages that SMP agents exchange between each other in order to:
- negotiate establishing unidirectional (simplex) encrypted queues on SMP server(s)
- exchange client messages and delivery notifications, providing sequential message IDs and message integrity (by including the hash of the previous message).
- the syntax and semantics of the commands (a higher level interface than SMP protocol) that are sent over TCP or other sequential protocol by agent clients to the agents. This protocol allows to create and manage multiple connections, each consisting of two simplex SMP queues.
- the syntax and semantics of the message that the clients of SMP agents should send out-of-band (as pre-shared "invitation" including SMP server, queue ID and encryption key) to ensure [E2E encryption][1] the integrity of SMP queues and protection against active attacks ([MITM attacks][2]).
The procedure of establishing a duplex connection is explained on the example of Alice and Bob creating a bi-directional connection comprised of two unidirectional (simplex) queues, using SMP agents (A and B) to facilitate it, and two different SMP servers (which could be the same server). It is shown on the diagram above and has these steps:
1. Alice requests the new connection from the SMP agent A using `NEW` command.
2. Agent A creates an SMP queue on the server (using [SMP protocol](./simplex-messaging.md)) and responds to Alice with the invitation that contains queue information and the encryption key Bob's agent B should use. The invitation format is described in [Connection invitation](#connection-invitation).
3. Alice sends the invitation to Bob via any secure channel they have (out-of-band message).
4. Bob sends `JOIN` command with the invitation as a parameter to agent B to accept the connection.
- Agent B sends unauthenticated message to SMP queue with ephemeral key that will be used to authenticate commands to the queue, as described in SMP protocol.
- Agent A receives the KEY and secures the queue.
- Agent B tries sending authenticated SMP SEND command with agent `HELLO` message until it succeeds. Once it succeeds, Bob's agent "knows" the queue is secured.
6. Agent B creates a new SMP queue on the server.
7. Establish Bob's SMP queue:
- Agent B sends `REPLY` message with the invitation to this 2nd queue to Alice's agent (via the 1st queue).
- Agent A having received this `REPLY` message sends unauthenticated message to SMP queue with Alice agent's ephemeral key that will be used to authenticate commands to the queue, as described in SMP protocol.
- Bob's agent receives the key and secures the queue.
- Alice's agent keeps sending `HELLO` message until it succeeds.
8. Agents A and B notify Alice and Bob that connection is established.
- Once sending `HELLO` succeeds, Alice's agent sends to Alice `CON` notification that confirms that now both parties can communicate.
- Once Bob's agent receives `HELLO` from Alice's agent, it sends to Bob `CON` notification as well.
At this point the duplex connection between Alice and Bob is established, they can use `SEND` command to send messages. The diagram also shows how the connection status changes for both parties, where the first part is the status of the SMP queue to receive messages, and the second part - the status of the queue to send messages.
The most communication happens between the agents and servers, from the point of view of Alice and Bob they have only 3 steps to do:
1. Alice requests a new connection with `NEW` command and receives the invitation.
2. Alice passes invitation out-of-band to Bob.
3. Bob accepts the connection by sending `JOIN` command with the invitation to his agent.
## Communication between SMP agents
SMP agents communicate via SMP servers managing creation, deletion and operations of SMP queues.
Agents can use SMP message client body (the part of the SMP message after header - see [SMP protocol](./simplex-messaging.md)) to transmit agent client messages and exchange messages between each other.
Each SMP message client body, once decrypted, contains 3 parts (one of them may include binary message body), as defined by `decryptedSmpMessageBody` syntax:
-`agentMsgHeader` - agent message header that contains sequential agent message ID for a particular SMP queue, agent timestamp (ISO8601) and the hash of the previous message.
-`agentMessage` - a command/message to the other SMP agent:
- to establish the connection with two SMP queues (`helloMsg`, `replyQueueMsg`)
- to send and to acknowledge user messages (`clientMsg`, `acknowledgeMsg`)
- to notify another agent about queue deletion (`deleteQueueMsg`)
-`msgPadding` - an optional message padding to make all SMP messages have consistent size as an additional privacy protection measure.
### Messages between SMP agents
Message syntax below uses [ABNF][3] with [case-sensitive strings extension][4].
ackProhibitedMsg= %"PROHIBITED"; e.g. "HELLO" or "REPLY"
ackSyntaxErr= %"SYNTAX"SPsyntaxErrCode
syntaxErrCode=1*DIGIT; TODO
```
#### HELLO message
This is the first message that both agents send after the respective SMP queue is secured by the receiving agent (see diagram). It contains the verification key that the sender will use to cryptographically sign the messages.
Sending agent might need to retry sending HELLO message, as it would not have any other confirmation that the queue is secured other than the success of sending this message with the signed SEND command of SMP protocol.
#### REPLY message
This is the message that is sent by the agent that received an out-of-band invitation to pass the invitation to the reply SMP queue to the agent that originated the connection (see diagram).
#### MSG message
This is the agent envelope used to send client messages once the connection is established. Do not confuse it with the MSG response from SMP server to the agent and MSG response from SMP agent to the client that are sent in different contexts.
## SMP agent commands
This part describes the transmissions between users and client-side SMP agents: commands that the users send to create and operate duplex connections and SMP agent responses and messages they deliver.
Commands syntax below is provided using [ABNF][3] with [case-sensitive strings extension][4].
Each transmission between the user and SMP agent must have this format/syntax:
badMsgIdErr= %"ID"SPpreviousMsgId; ID is lower than the previous
badHashErr= %"HASH"
acknowledge=%s"ACK"SPagentMsgId; ID assigned by receiving agent (in MSG "R")
; currently not implemented
received=%s"RCVD"SPagentMsgId; ID assigned by sending agent (in SENT response)
; currently not implemented
ok=%s"OK"
error=%s"ERR"SPerrorType
encoded=base64
```
### Client commands and server responses
#### NEW command and INV response
`NEW` command is used to create a connection and an invitation to be sent out-of-band to another protocol user. It should be used by the client of the agent that initiates creating a duplex connection.
`INV` response is sent by the agent to the client.
#### JOIN command
It is used to create a connection and accept the invitation received out-of-band. It should be used by the client of the agent that accepts the connection.
#### CON notification
It is sent by both agents managing duplex connection to their clients once the connection is established and ready to accept client messages.
#### SUB command
This command can be used by the client to resume receiving messages from the connection that was created in another TCP/client session. Agent response to this command can be `OK` or `ERR` in case connection does not exist (or can only be used to send connections - e.g. when the reply queue was not created).
#### SEND command and SENT response
`SEND` command is used to the client to send messages
`SENT` response is sent by the agent to confirm that the message was delivered to the SMP server. Message ID in this response is the sequential message number that includes both sent and received messages in the connection.
#### MSG notification
It is sent by the agent to the client when agent receives the message from the SMP server. It has message ID and timestamp from both the receiving and sending agents and from SMP server:
- recipient agent ID is intended to be used to refer to the message in the future.
- sender agent ID is intended to be used to identify any missed / skipped message(s)
- broker ID should be used to detect duplicate deliveries (it would happen if TCP connection is lost before the message is acknowledged by the agent - see [SMP protocol](./simplex-messaging.md))
#### END notification
It is sent by the agent to the client when agent receives SMP protocol `END` notification from SMP server. It indicates that another agent has subscribed to the same SMP queue on the server and the server terminated the subscription of the current agent.
#### OFF command
It is used to suspend the receiving SMP queue - sender will no longer be able to send the messages to the connection, but the recipient can retrieve the remaining messages. Agent response to this command can be `OK` or `ERR`. This command is irreversible.
#### DEL command
It is used to delete the connection and all messages in it, as well as the receiving SMP queue and all messages in it that were remaining on the server. Agent response to this command can be `OK` or `ERR`. This command is irreversible.
## Connection invitation
Connection invitation `qInfo` is generated by SMP agent in response to `newCmd` command (`"NEW"`), used by another party user with `joinCmd` command (`"JOIN"`), and then another invitation is sent by the agent in `replyQueueMsg` and used by the first party agent to connect to the reply queue (the second part of the process is invisible to the users).
Connection invitation is a text with the following syntax:
This readme is currently a stub and as such is in development.
Ultimately, this readme will act as a guide to contributing to the develop of the SimpleX android app.
## Gotchas
#### SHA Signature for verification for app links/deep links
In order for the SimpleX app to be automatically adopted for opening links from https://simplex.chat the SHA certificate fingerprint for the App installed on the phone must be in the hosted [assetlinks.json](https://simplex.chat/.well-known/assetlinks.json) file on simplex.chat.
The accepted fingerprints are in the `sha256_cert_fingerprints` list.
To find your SHA certificate fingerprint perform the following steps.
1. Build and install your development version of the app as usual
2. From the terminal in Android studio run `adb shell pm get-app-links chat.simplex.app`
3. Copy the signature listed in `signatures` in the result
4. Add your signature to [assetlinks.json](https://github.com/simplex-chat/website/blob/master/.well-known/assetlinks.json) in the [website repo](https://github.com/simplex-chat/website) and make a PR. On approval, wait a few minutes for the changes to propagate to the public website and then you should be able to verify SimpleX.
More information is available [here](https://developer.android.com/training/app-links/verify-site-associations#manual-verification). If there is no response when running the `pm get-app-links` command, the intents in `AndroidManifest.xml` are likely misspecified. A verification attempt can be triggered using `adb shell pm verify-app-links --re-verify chat.simplex.app`.
Note that this is not an issue for the app store build of the app as this is signed with our app store credentials and thus there is a stable signature over users. Developers do not have general access to these credentials for development and testing.
ChatItem.getFileMsgContentSample(text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",fileStatus=CIFileStatus.RcvInvitation),
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
)
),
chatStats=Chat.ChatStats()
),
null,
null,
false,
null,
null,
stopped=false,
linkMode=SimplexLinkMode.DESCRIPTION
)
},
click={},
dropdownMenuItems=null,
showMenu=remember{mutableStateOf(false)},
stopped=false
)
}
}
@Preview
@Preview(
uiMode=Configuration.UI_MODE_NIGHT_YES,
showBackground=true,
name="Dark Mode"
)
@Composable
funPreviewChatListNavLinkGroup(){
SimpleXTheme{
ChatListNavLinkLayout(
chatLinkPreview={
ChatPreviewView(
Chat(
chatInfo=ChatInfo.Group.sampleData,
chatItems=listOf(
ChatItem.getSampleData(
1,
CIDirection.DirectSnd(),
Clock.System.now(),
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.