diff --git a/hc/front/views.py b/hc/front/views.py index 8281d887..c7fd0737 100644 --- a/hc/front/views.py +++ b/hc/front/views.py @@ -1140,7 +1140,8 @@ def add_matrix(request): ctx = { "page": "channels", - "form": form + "form": form, + "matrix_user_id": settings.MATRIX_USER_ID } return render(request, "integrations/add_matrix.html", ctx) diff --git a/hc/settings.py b/hc/settings.py index 144326cb..e38846b3 100644 --- a/hc/settings.py +++ b/hc/settings.py @@ -198,6 +198,7 @@ TRELLO_APP_KEY = os.getenv("TRELLO_APP_KEY") # Matrix MATRIX_HOMESERVER = os.getenv("MATRIX_HOMESERVER") +MATRIX_USER_ID = os.getenv("MATRIX_USER_ID") MATRIX_ACCESS_TOKEN = os.getenv("MATRIX_ACCESS_TOKEN") if os.path.exists(os.path.join(BASE_DIR, "hc/local_settings.py")): diff --git a/static/img/integrations/setup_matrix_1.png b/static/img/integrations/setup_matrix_1.png new file mode 100644 index 00000000..139a5218 Binary files /dev/null and b/static/img/integrations/setup_matrix_1.png differ diff --git a/static/img/integrations/setup_matrix_2.png b/static/img/integrations/setup_matrix_2.png new file mode 100644 index 00000000..b9993dac Binary files /dev/null and b/static/img/integrations/setup_matrix_2.png differ diff --git a/static/img/integrations/setup_matrix_3.png b/static/img/integrations/setup_matrix_3.png new file mode 100644 index 00000000..b9c66096 Binary files /dev/null and b/static/img/integrations/setup_matrix_3.png differ diff --git a/templates/integrations/add_matrix.html b/templates/integrations/add_matrix.html index 77ca5962..65bbd330 100644 --- a/templates/integrations/add_matrix.html +++ b/templates/integrations/add_matrix.html @@ -14,6 +14,67 @@ to an appropriate Matrix room.
++ Invite {{ matrix_user_id }} + into your Matrix room. +
++ Note: after joining the room, + {{ matrix_user_id }} will be + able to read its messages. + Do not invite to rooms with sensitive content. + Consider creating a dedicated room for notifications. +
++ Look up the room's alias or + ID, and paste it in the form + below and save the integration. +
++ {{ matrix_user_id }} will shortly join your room. + After that, you are all set! From now on + {% site_name %} will post notifications + to your room when checks go down or up. +
+