app/matrix enable telegram in matrix.0x3c.pl
Change-Id: Id602fb46904f4499a797af593ec129b9ebc3f526
diff --git a/app/matrix/matrix.0x3c.pl.jsonnet b/app/matrix/matrix.0x3c.pl.jsonnet
index 3ecb2e4..76de45f 100644
--- a/app/matrix/matrix.0x3c.pl.jsonnet
+++ b/app/matrix/matrix.0x3c.pl.jsonnet
@@ -23,4 +23,38 @@
"welcomeBackgroundUrl": "https://media.0x3c.pl/file/0x3c-mastodon/0x3c-pixelsort.png"
},
},
+
+ appservices: {
+ "telegram-prod": telegram.AppServiceTelegram("prod") {
+ cfg+: {
+ image: cfg.images.appserviceTelegram,
+ storageClassName: cfg.storageClassName,
+ metadata: app.metadata("appservice-telegram-prod"),
+
+ config+: {
+ homeserver+: {
+ address: "https://%s" % [cfg.webDomain],
+ domain: cfg.serverName,
+ },
+ appservice+: {
+ id: "telegram",
+ bot_avatar: "https://media.0x3c.pl/file/0x3c-mastodon/posejbot2.png",
+ },
+ telegram+: {
+ # not7cd: it may be convinient to use same bot credentials for both appservices
+ api_id: (std.split(importstr "secrets/plain/appservice-telegram-0x3c-api-id", "\n"))[0],
+ api_hash: (std.split(importstr "secrets/plain/appservice-telegram-0x3c-api-hash", "\n"))[0],
+ bot_token: (std.split(importstr "secrets/plain/appservice-telegram-0x3c-token", "\n"))[0],
+ },
+ bridge+: {
+ permissions+: {
+ "0x3c.pl": "puppeting",
+ "@not7cd:0x3c.pl": "admin", // propabbly
+ "@q3k:0x3c.pl": "admin",
+ },
+ },
+ },
+ },
+ },
+ },
}