pull/567/head
Gero Gerke 3 years ago
parent 34b86352f2
commit 6bebc623f9

@ -15,7 +15,7 @@ class Matrix extends NotificationProvider {
.slice(0, size); .slice(0, size);
const roomId = notification const roomId = notification
.internalRoomId .internalRoomId
.replaceALl(":", "%3A") .replaceAll(":", "%3A")
.replaceAll("!", "%21"); .replaceAll("!", "%21");
try { try {

@ -1,17 +1,26 @@
<template> <template>
<div class="mb-3"> <div class="mb-3">
<label for="homeserver-url" class="form-label">Homeserver URL (with http(s):// and optionally port)</label> <label for="homeserver-url" class="form-label">Homeserver URL (with http(s):// and optionally port)</label><span style="color: red;"><sup>*</sup></span>
<input id="homeserver-url" v-model="$parent.notification.homeserverUrl" type="text" class="form-control" :required="true"> <input id="homeserver-url" v-model="$parent.notification.homeserverUrl" type="text" class="form-control" :required="true">
<label for="internal-room-id" class="form-label">Internal Room Id</label> </div>
<div class="mb-3">
<label for="internal-room-id" class="form-label">Internal Room Id</label><span style="color: red;"><sup>*</sup></span>
<input id="internal-room-id" v-model="$parent.notification.internalRoomId" type="text" class="form-control" required="true"> <input id="internal-room-id" v-model="$parent.notification.internalRoomId" type="text" class="form-control" required="true">
<label for="access-token" class="form-label">Access Token</label> </div>
<div class="mb-3">
<label for="access-token" class="form-label">Access Token</label><span style="color: red;"><sup>*</sup></span>
<HiddenInput id="access-token" v-model="$parent.notification.accessToken" :required="true" autocomplete="one-time-code" :maxlength="500"></HiddenInput> <HiddenInput id="access-token" v-model="$parent.notification.accessToken" :required="true" autocomplete="one-time-code" :maxlength="500"></HiddenInput>
</div> </div>
<p style="margin-top: 8px;"> <div class="form-text">
You can find the internal room ID by looking in the advanced section if your Matrix client. It should look like !QMdRCpUIfLwsfjxye6:home.server.<br/> <span style="color: red;"><sup>*</sup></span>Required
It is highly recommended you create a new user and do not use your Matrix user's access token as it will allow full access to the matrix user. You can get the access token by running curl -XPOST -d '{"type":"m.login.password", "identifier": {"user":"botusername", "type": "m.id.user"}, "password":"passwordforuser"}' "https://home.server.url/_matrix/client/r0/login". <p style="margin-top: 8px;">
</p> You can find the internal room ID by looking in the advanced section if your Matrix client. It should look like !QMdRCpUIfLwsfjxye6:home.server.
</p>
<p style="margin-top: 8px;">
It is highly recommended you create a new user and do not use your Matrix user's access token as it will allow full access to the matrix user. You can get the access token by running <code>curl -XPOST -d '{"type":"m.login.password", "identifier": {"user":"botusername", "type": "m.id.user"}, "password":"passwordforuser"}' "https://home.server/_matrix/client/r0/login"</code>.
</p>
</div>
</template> </template>
<script> <script>

Loading…
Cancel
Save