xous-core/apps/mtxchat
2024-12-16 18:50:11 +08:00
..
locales use status bar to count receive events during listen 2023-10-29 20:06:57 +08:00
src mtxchat port to xous-ipc 0.10 2024-09-23 17:00:53 +08:00
Cargo.toml stage tomls for version bump: try_send added to xous-ipc 2024-12-16 18:50:11 +08:00
README.md update mtxchat README.md 2023-09-25 21:10:35 +10:00

mtxchat

This is the skeleton of a [matrix] chat application.

The UI and local storage are provided by the xous chat library.

Contributions to development of apps/mtxchat and libs/chat are most welcome.

Build

Run mtxchat in hosted mode with cargo xtask run --app mtxchat

Build mtxchat for the Precursor device with cargo xtask app-image --app mtxchat

Prerequisites:

Use another device such as a mobile or PC to:

Functionality

mtxchat provides the following basic functionality:

  • login to an existing account on a [matrix] server
  • nominate an existing room on a [matrix] server
  • read recent posts
  • post text to the room

Structure

The mtxchat code is primarily concerned with the [matrix] specific protocols, while the Chat library handles the UI and pddb storage.

Much of the code in main.rs lib.rs web.rs & url.rs has been adapted from mtxcli.

The Chat library provides the UI to display a series of matrix events (Posts) in a matrix room (Dialogue) stored in the pddb. Each Dialogue is stored in the pddb:dict mtxchat.dialogue under a descriptive pddb:key (ie #xous-apps:matrix.org).

mtxchat passes a menu to the Chat UI:

  • room to type a [matrix] room/server
  • login to type a username/server & passwords
  • logout

The mtxchat servers is set to receive:

  • MtxchatOp::Post A memory msg containing an outbount user post
  • MtxchatOp::Event A scalar msg containing important Chat UI events
  • mtxchat::Menu A scalar msg containing click on a mtxchat MenuItem
  • MtxchatOp::Rawkeys A scalar msg for each keystroke

Troubleshooting

If you see the message WARNING: clock not set that is likely because the Precursor real time clock needs to be set (e.g. if the battery has been completely discharged). Please go to the menu Preferences | Set Timezone to set the time zone (and update the time via NTP).

If you see the message authentication failed it might be because the user and password variables are not set properly. Alternatively it could be because TLS certificate validation has failed because the clock has not been set (see above).