git ssb

0+

cel / pingbot-appservice-rs



Tree: 4528900f89f26538dfd532ace24bd7d46076e998

Files: 4528900f89f26538dfd532ace24bd7d46076e998 / README.md

2198 bytesRaw

pingbot-appservice-rs

Matrix pingbot appservice in Rust

Install

Joining rooms must be done manually. Here is a command to do it via Client-Server API):

curl -d '{}' "https://mobilizon.us/_matrix/client/v3/rooms/%21ROOM_ID:example.org/join?access_token=$AS_TOKEN"

The appservice responds in rooms to the !ping command.

Development

The appservice runs a HTTP server, using systemd socket activation to receive the server socket. When not run via systemd, you can emulate this by using systemfd; further, you can use cargo-watch for auto-reloading during development, as follows:

cargo install systemfd cargo-watch
systemfd --no-pid -s http::7001 -- cargo watch -qx run

If run without systemd/systemfd, the appservice listens on a random port. A benefit of using the socket activation is that requests received during recompilation do not fail but are served when the compilation succeeds and the program starts.

References

License

AGPL3+

Built with git-ssb-web