Tg bridge.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
.env
|
||||
data/prosody/certs
|
||||
web-sites
|
||||
|
||||
@@ -25,6 +25,10 @@ modules_enabled = {
|
||||
|
||||
-- Admin interface
|
||||
"admin_adhoc";
|
||||
|
||||
-- Gateway support
|
||||
"privilege";
|
||||
"http_file_share";
|
||||
};
|
||||
|
||||
modules_disabled = {
|
||||
@@ -75,6 +79,17 @@ VirtualHost "guschin.info"
|
||||
key = "/etc/prosody/certs/guschin.info.key";
|
||||
certificate = "/etc/prosody/certs/guschin.info.crt";
|
||||
}
|
||||
privileged_entities = {
|
||||
["telegram.guschin.info"] = {
|
||||
roster = "both"; -- auto add/remove Telegram contacts from roster
|
||||
message = "outgoing"; -- reflect messages sent via official Telegram apps
|
||||
iq = {
|
||||
["http://jabber.org/protocol/pubsub"] = "both"; -- PEP bookmarks
|
||||
["http://jabber.org/protocol/pubsub#owner"] = "set"; -- message display sync
|
||||
["urn:xmpp:http:upload:0"] = "get"; -- upload on behalf of users
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
-- Secondary virtual host (user@xmpp.guschin.info)
|
||||
VirtualHost "xmpp.guschin.info"
|
||||
@@ -87,3 +102,11 @@ VirtualHost "xmpp.guschin.info"
|
||||
Component "muc.guschin.info" "muc"
|
||||
modules_enabled = { "muc_mam" }
|
||||
storage = "sql"
|
||||
|
||||
-- HTTP file upload (XEP-0363) — used by slidgram for Telegram→XMPP attachments
|
||||
Component "upload.guschin.info" "http_file_share"
|
||||
http_file_share_access = { "telegram.guschin.info" }
|
||||
|
||||
-- Telegram gateway (slidgram)
|
||||
Component "telegram.guschin.info"
|
||||
component_secret = os.getenv("SLIDGRAM_COMPONENT_SECRET")
|
||||
|
||||
@@ -38,6 +38,24 @@ services:
|
||||
networks:
|
||||
- prosody
|
||||
|
||||
slidgram:
|
||||
image: git.sr.ht/~nicoco/slidgram:latest
|
||||
container_name: slidgram
|
||||
environment:
|
||||
SLIDGE_JID: telegram.guschin.info
|
||||
SLIDGE_SECRET: ${SLIDGRAM_COMPONENT_SECRET}
|
||||
SLIDGE_SERVER: prosody-xmpp
|
||||
SLIDGE_PORT: 5347
|
||||
SLIDGE_UPLOAD_SERVICE: upload.guschin.info
|
||||
volumes:
|
||||
- ./data/slidgram:/var/lib/slidge
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
prosody:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- prosody
|
||||
|
||||
networks:
|
||||
prosody:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user