Skip to content

Latest commit

 

History

History
151 lines (114 loc) · 6.24 KB

README.md

File metadata and controls

151 lines (114 loc) · 6.24 KB

Haskell Client for Wire

CI

This is not just a CLI as the name of the repository suggest. However, the project had started as a CLI.

WARNING: This is an unofficial client of Wire, please use it only with a server which allows unofficial clients (or this client in particular) in its terms and conditions.

Goals

  1. Provide an Electron free way to communicate using Wire on a desktop.
  2. Provide an automation friendly way to use the Wire backend as a "user" (not "bot"/"service").
  3. Provide a truly configurable client, so the user can be in control of where and how to store the data.
  4. Discover problems with libraries/tooling in the Haskell eco-system and fix them.

Railmap/Status

Feature wire-cli wire-gui
Registration ✔️
Search another user ✔️
Connections ✔️
Create conversations ✔️
Discover conversations ✔️ ✔️
Manage conversations
Send text message ✔️ ✔️
Receive text message ✔️ ✔️
E2EE message exchange (Proteus) ✔️ ✔️
Proteus session reset
E2EE messaging (MLS)
Mark as read/unread
Read reciepts
Delivery receipts
Send/Recieve Assets
Voice Mesages
Notifications ✔️
Update profile data
Calling
Storage: Directory full of JSON Files ✔️ ✔️
Storage: Sqlite
Storage: Remote RDBMS (mysql/postgres)
Storage: encryption at rest
Backup/Restore
Restore from Android/iOS/Web backups
Search local messages
Tag/tokenize images/videos/pdfs/links for search
Logging
Legalhold
Login with SSO
Team management

Contributing

Development setup

Pre-requisites

  1. nix-flakes
  2. direnv (optional)

How to ...

NOTE All commands are to be run from root of this repo.

  1. How to get a development shell with direnv?

    direnv allow
  2. How to get a development shell without direnv?

    nix develop
  3. How to run unit tests from development shell?

    make test-unit
  4. How to run integration tests from development shell?

    When targetting "demo" setup defined in the wire-server repository:

    make test-int-demo demo_host=<ip_addr>

    The demo_host parameter defaults to 127.0.0.1 if not specified.

    When targetting a deployed wire-server, the tests can use the "backdoor" basic auth to talk to nginz. This requires the nginz helm chart deployed with nginx_conf.env set to staging. Once such an environment is available, the tests can be run like this:

    make test-int-kube \
        kube_nginz_host=nginz-https.<domain> \
        kube_nginz_port=443 \
        kube_backdoor_nginz_user=<name> \
        kube_backdoor_nginz_password=<password>
  5. How to run haskell-language-server (HLS) so it uses dev-shell?

    To ensure that haskell-language-server executes in development environment lsp-wrapper.sh can be used. The script uses direnv exec to ensure that HLS runs inside the development environment. Without direnv this can be done using nix develop, but at this point it is not very clear how to do this.

    With emacs and direnv, this .dir-local.el file works:

    ((haskell-mode . ((lsp-haskell-server-path . "/<path-to-wire-cli-repo>/lsp-wrapper.sh"))))
  6. How to pin a haskell package to a particular hackage version?

    Add something like this to hackagePins array in ./pins.yaml:

    - package: <package-name>
      version: <version>
  7. How to pin a haskell package to a particular commit in git?

    Add something like this to gitPins array in ./pins.yaml:

    - location: <https://server/owner/repo>
      commit: <sha>
    
      # Only required if the cabal file is not at the root of repo
      subdirs:
      - <some-subdir>
      - <another-subdir>
  8. How to format code?

    Using ormolu.