mirror of
https://github.com/Skylar-Tech/node-red-contrib-matrix-chat.git
synced 2026-05-18 13:13:18 -06:00
Compare commits
3 Commits
v0.8.0
...
4a0a16b86e
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a0a16b86e | |||
| cf82daf5da | |||
| 6bbd1d5119 |
@@ -13,6 +13,8 @@ The following is supported from this package:
|
|||||||
- [Currently a WIP](#end-to-end-encryption-notes)
|
- [Currently a WIP](#end-to-end-encryption-notes)
|
||||||
- Can also use [pantalaimon](https://github.com/matrix-org/pantalaimon) as an alternative solution to E2EE (if you need multiple sessions synced up with keys)
|
- Can also use [pantalaimon](https://github.com/matrix-org/pantalaimon) as an alternative solution to E2EE (if you need multiple sessions synced up with keys)
|
||||||
- Receive events from a room (messages, reactions, images, audio, locations, and files) whether encrypted or not
|
- Receive events from a room (messages, reactions, images, audio, locations, and files) whether encrypted or not
|
||||||
|
- Fetch and modify room state events (for changing room settings)
|
||||||
|
- Paginate room history
|
||||||
- Send Images/Files (sending files to e2ee room doesn't currently encrypt them yet)
|
- Send Images/Files (sending files to e2ee room doesn't currently encrypt them yet)
|
||||||
- Edit messages
|
- Edit messages
|
||||||
- Send typing events (Bot is typing ...)
|
- Send typing events (Bot is typing ...)
|
||||||
|
|||||||
@@ -36,7 +36,8 @@
|
|||||||
name: { value: null },
|
name: { value: null },
|
||||||
autoAcceptRoomInvites: { value: true },
|
autoAcceptRoomInvites: { value: true },
|
||||||
enableE2ee: { type: "checkbox", value: true },
|
enableE2ee: { type: "checkbox", value: true },
|
||||||
global: { type: "checkbox", value: true }
|
global: { type: "checkbox", value: true },
|
||||||
|
allowUnknownDevices: { type: "checkbox", value: false }
|
||||||
},
|
},
|
||||||
icon: "matrix.png",
|
icon: "matrix.png",
|
||||||
label: function() {
|
label: function() {
|
||||||
@@ -130,6 +131,20 @@
|
|||||||
<code style="white-space: normal;">let client = global.get("matrixClient['@bot:example.com']");</code>
|
<code style="white-space: normal;">let client = global.get("matrixClient['@bot:example.com']");</code>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
id="node-config-input-allowUnknownDevices"
|
||||||
|
style="width: auto; margin-left: 125px; vertical-align: top"
|
||||||
|
/>
|
||||||
|
<label for="node-config-input-allowUnknownDevices" style="width: auto">
|
||||||
|
Allow unverified devices in rooms
|
||||||
|
</label>
|
||||||
|
<div class="form-tips" style="margin-bottom: 12px;">
|
||||||
|
Allow sending messages to a room with unknown devices which have not been verified.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$("#matrix-login-btn").on("click", function() {
|
$("#matrix-login-btn").on("click", function() {
|
||||||
function prettyPrintJson(json) {
|
function prettyPrintJson(json) {
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ module.exports = function(RED) {
|
|||||||
this.autoAcceptRoomInvites = n.autoAcceptRoomInvites;
|
this.autoAcceptRoomInvites = n.autoAcceptRoomInvites;
|
||||||
this.e2ee = n.enableE2ee || false;
|
this.e2ee = n.enableE2ee || false;
|
||||||
this.globalAccess = n.global;
|
this.globalAccess = n.global;
|
||||||
|
this.allowUnknownDevices = n.allowUnknownDevices || false;
|
||||||
this.initializedAt = new Date();
|
this.initializedAt = new Date();
|
||||||
node.initialSyncLimit = 25;
|
node.initialSyncLimit = 25;
|
||||||
|
|
||||||
@@ -401,6 +402,7 @@ module.exports = function(RED) {
|
|||||||
node.log("Initializing crypto...");
|
node.log("Initializing crypto...");
|
||||||
await node.matrixClient.initCrypto();
|
await node.matrixClient.initCrypto();
|
||||||
node.matrixClient.getCrypto().globalBlacklistUnverifiedDevices = false; // prevent errors from unverified devices
|
node.matrixClient.getCrypto().globalBlacklistUnverifiedDevices = false; // prevent errors from unverified devices
|
||||||
|
node.matrixClient.getCrypto().globalErrorOnUnknownDevices = !node.allowUnknownDevices;
|
||||||
}
|
}
|
||||||
node.log("Connecting to Matrix server...");
|
node.log("Connecting to Matrix server...");
|
||||||
await node.matrixClient.startClient({
|
await node.matrixClient.startClient({
|
||||||
|
|||||||
Reference in New Issue
Block a user