Package Details: matrix-appservice-telegram 0.8.2-2

Git Clone URL: https://aur.archlinux.org/matrix-appservice-telegram.git (read-only, click to copy)
Package Base: matrix-appservice-telegram
Description: A Matrix-Telegram hybrid puppeting/relaybot bridge.
Upstream URL: https://github.com/tulir/mautrix-telegram
Licenses: AGPLv3
Submitter: BluePeril
Maintainer: BluePeril
Last Packager: BluePeril
Votes: 4
Popularity: 0.090004
First Submitted: 2020-01-08 06:54
Last Updated: 2020-07-29 11:05

Dependencies (17)

Required by (0)

Sources (3)

Latest Comments

BubuIIC commented on 2020-06-12 09:44

I have a few suggestions for improving the package. Some of those might be hard to do as an upgrade path, not sure currently.

Instead of moving the example config to /etc/mautrix-telegram/example-config.yaml I'd link it instead from the package dir. The bridge needs the example config at runtime and it will automatically find it there. (The package currently uses the user generated config also as "example config" in the service file which only works as long as you do manual config migrations on every update.)

I added the alembic upgrade head call to the systemd service file as an ExecStartPre command:

ExecStartPre=/usr/bin/alembic -c /etc/mautrix-telegram/alembic.ini -x config=/etc/mautrix-telegram/config.yaml upgrade head (When the working dir is also changed as below, the alembic.ini needs to be edited to point to the absolute path /etc/mautrix-telegram/alembic/ dir.)

I also enabled systemd's DynamicUser feature with this:

ExecStart=/usr/bin/mautrix-telegram -c /etc/mautrix-telegram/config.yaml -r /etc/mautrix-telegram/registration.yaml
WorkingDirectory=/var/lib/mautrix-telegram/
DynamicUser=true
ConfigurationDirectory=mautrix-telegram
StateDirectory=mautrix-telegram

sakaru commented on 2020-02-05 13:31

I see that you have a post_remove function to rm -rf /etc/mautrix-telegram/. I think it's better to instead declare /etc/mautrix-telegram/config.yaml (and perhaps /etc/mautrix-telegram/registration.yaml) as specify them as backup files (which will rename them with a .pacsave suffix). See how nginx specified backup files as an example.