Skip to content

mnotify 0.3.0

Latest

Choose a tag to compare

@rumpelsepp rumpelsepp released this 07 Oct 19:41

mn now works out of the box on headless machines, prints for people by default, follows MSC4153 ("invisible crypto") and keeps several accounts side by side in profiles. Several commands, flags and defaults changed; see "Breaking changes" before upgrading scripts.

Breaking changes

  • output is human-readable by default; pass --json (global) to get the previous JSON output
  • room commands moved under mn room: mn room join replaces mn join, mn room list and mn room info -r <room> replace mn rooms
  • logins from 0.2.0 are rejected: remove the login and log in again
  • MN_META_FILE is gone; use profiles instead
  • sync --raw is gone
  • login -p/--password and recovery enable -p are gone; passwords come from the prompt or stdin. -p now selects the profile
  • the global -f short flag and the --presense and --room-id spellings are gone; use --presence and -r/--room
  • mn verify only verifies own devices
  • encrypted messages from devices that are not cross-signed are no longer decrypted, and room keys are not shared with such devices
  • the MIME type of attachments comes from the file extension only

Profiles

  • mn -p/--profile <name> (or MN_PROFILE) selects a profile, "default" without it; each has its own login, store and lock in $XDG_STATE_HOME/mnotify//
  • a profile can hold a second device of an account, e.g. a sender next to a running mn sync
  • state from before profiles is moved into "default" on the first run

Rooms

  • mn room create: an end-to-end encrypted room unless --unencrypted, with optional name, topic, alias, invites and public join rule
  • mn room join joins a room or accepts an invite
  • -r/--room takes room IDs and aliases, default from MN_ROOM

Messaging

  • threads: send --thread EVENT_ID, messages --thread EVENT_ID
  • mentions: send --mention @user:server (repeatable) and --mention-room; every message declares its mentions, so a name in the body no longer pings anyone
  • --reply-to also works with notices, emotes and attachments
  • send prints the event ID, so id=$(mn send ...) works
  • attachments carry their file size
  • empty messages are refused, the trailing newline of stdin is stripped

Output

  • room list, room info: tables; messages, sync: one line per event with local time, sender and text; whoami, homeserver, recovery status: key/value tables
  • redacted events in encrypted rooms are shown as [deleted]

Encryption

  • invisible crypto (MSC4153): cross-signing keys are created for accounts that have none, the own device is signed, and mn login says what is left to do
  • mn messages reads messages from before the login via the key backup; messages whose sender is not proven are marked [unverified]
  • recovery enable no longer replaces an existing cross-signing identity; it needs a cross-signed device and no password

Sync

  • simplified sliding sync (MSC4186) where the homeserver offers it, /v3/sync otherwise; only what the command needs is synced. First mn send on a 312-room account: 3.7 s → 0.33 s. MN_SLIDING_SYNC=0 at login opts out
  • on /v3/sync, one-shot commands no longer wait up to 30 s when nothing new has arrived

Headless

  • without a Secret Service the secrets go to a 0600 session.json automatically, with a warning at login
  • login --homeserver for servers without .well-known
  • HTTPS_PROXY, ALL_PROXY and NO_PROXY are honoured
  • concurrent mn processes of one profile are serialized by a lock, so parallel sends (cron) no longer lose room keys or fail with M_UNKNOWN_POS
  • clean is purely local and works offline
  • no ANSI colours when stderr is not a terminal

Fixes

  • logout failed for OAuth (--qr) sessions
  • mn verify asks only once per verification and reports a cancellation as an error; it no longer panics on cancel, missing TTY or missing emojis
  • mn typing --disable clears the indicator
  • a pending invite is reported as such instead of M_FORBIDDEN
  • mp3 files are sent as audio/mpeg

Other

  • matrix-sdk 0.18 → 0.19
  • contrib/mail2matrix: forward server mail to a room
  • bats e2e suite against a throwaway Synapse, run in CI with both sync APIs; justfile for build, lint, tests, e2e and releases