From 7a486f5ed6c17555a6ea0fdadd71904eec380c9e Mon Sep 17 00:00:00 2001
From: Stasiek Michalski <hellcp@opensuse.org>
Date: Apr 11 2020 20:46:56 +0000
Subject: Fix misc errors


---

diff --git a/pillar/role/matrix.sls b/pillar/role/matrix.sls
index d718e5f..708ba47 100644
--- a/pillar/role/matrix.sls
+++ b/pillar/role/matrix.sls
@@ -15,14 +15,17 @@ profile:
         port: 9001
         client_id: 672058964707377152
         appservice_id: 330d1b6dcdf6a2217454f8227d2a960030d341a8baca5fa5c40f4081b6f40acd
+        build: True
       webhook:
         repo: https://github.com/turt2live/matrix-appservice-webhooks
         port: 9002
         appservice_id: f4de7550133374c703c4cd64c5898cf1b82b65d4a5c2aca93863ee1fb859df91
+        build: False
       irc:
         repo: https://github.com/matrix-org/matrix-appservice-irc
         port: 9003
         appservice_id: 1deb544b666b3aba1d9d49d3d4785eeb2fb2befa24e0743c91e6290866003c33
+        build: True
     telegram:
       appservice_id: oepzkscngbyqvopzn773ns7whfxyfslgjhy7mumy7syurqp3f4kvb4sgufz9nfsw
       api_id: 1331253
diff --git a/salt/profile/matrix/appservice.sls b/salt/profile/matrix/appservice.sls
index 3deaec2..512a898 100644
--- a/salt/profile/matrix/appservice.sls
+++ b/salt/profile/matrix/appservice.sls
@@ -66,6 +66,7 @@ synapse_appservice_{{ dir }}_file:
     - env:
       - NODE_VERSION: 10
 
+{% if data.get('build') == True %}
 {{ dir }}_build:
   cmd.run:
     - name: npm run build
@@ -73,6 +74,7 @@ synapse_appservice_{{ dir }}_file:
     - runas: synapse
     - env:
       - NODE_VERSION: 10
+{% endif %}
 
 {{ dir }}_systemd_file:
   file.managed:
diff --git a/salt/profile/matrix/files/telegram.service b/salt/profile/matrix/files/telegram.service
index b58eb62..57f6bb4 100644
--- a/salt/profile/matrix/files/telegram.service
+++ b/salt/profile/matrix/files/telegram.service
@@ -9,7 +9,7 @@ RestartSec=3
 User=synapse
 Group=synapse
 WorkingDirectory=/var/lib/matrix-synapse/telegram/
-ExecStart=python3 -m mautrix_telegram -c config.yaml -f telegram-registration.yaml
+ExecStart=/usr/bin/python3 -m mautrix_telegram -c config.yaml -f telegram-registration.yaml
 
 [Install]
 WantedBy=multi-user.target
diff --git a/salt/profile/matrix/synapse.sls b/salt/profile/matrix/synapse.sls
index bf5cb3f..85297c1 100644
--- a/salt/profile/matrix/synapse.sls
+++ b/salt/profile/matrix/synapse.sls
@@ -1,7 +1,7 @@
 synapse_dependencies:
   pkg.installed:
     - pkgs:
-      - python3-matrix-synapse
+      - matrix-synapse
       - python3-matrix-synapse-ldap3
 
 synapse:
diff --git a/salt/profile/matrix/telegram.sls b/salt/profile/matrix/telegram.sls
index f9042e2..33204a4 100644
--- a/salt/profile/matrix/telegram.sls
+++ b/salt/profile/matrix/telegram.sls
@@ -3,7 +3,7 @@ telegram_pgks:
     - pkgs:
       - python3-mautrix-telegram
       # Required for webm for stickers
-      - ffmpeg
+      - ffmpeg-3
 
 /var/lib/matrix-synapse/telegram:
   file.directory:
diff --git a/salt/role/matrix.sls b/salt/role/matrix.sls
index 7ae7418..6bec80d 100644
--- a/salt/role/matrix.sls
+++ b/salt/role/matrix.sls
@@ -3,5 +3,5 @@ include:
   - profile.matrix.init
   - profile.matrix.appservice
   - profile.matrix.telegram
-  - profile.matrix.dimension
+  # - profile.matrix.dimension
   - profile.matrix.config