Compare commits

..

6 Commits

Author SHA1 Message Date
skylord123 54a9972bbc Merge pull request #121 from Skylar-Tech/dev
Release v0.9.0
2025-02-07 20:56:40 -07:00
skylord123 ad34f018ab Merge pull request #127 from koosc/allow-unknown
Add option for allowing unknown devices in rooms
2025-02-07 20:52:10 -07:00
skylord123 20345787d2 README.md change 2025-02-07 20:50:25 -07:00
skylord123 99c19923c6 Release v0.9.0 2025-02-07 20:27:36 -07:00
skylord123 093d59893e Fix roomId and eventId inputs not saving field type correctly for get-event node 2025-02-07 20:27:19 -07:00
skylord123 913f5dfcb9 - Upgrade to matrix-js-sdk 34.11.1 to fix CVE-2024-50336
- Remove request package (no longer needed)
2025-02-05 11:59:39 -07:00
5 changed files with 149 additions and 761 deletions
+2
View File
@@ -5,6 +5,8 @@
Join our public Matrix room for help: [#node-red-contrib-matrix-chat:skylar.tech](https://app.element.io/#/room/#node-red-contrib-matrix-chat:skylar.tech) Join our public Matrix room for help: [#node-red-contrib-matrix-chat:skylar.tech](https://app.element.io/#/room/#node-red-contrib-matrix-chat:skylar.tech)
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/B0B51BM7C)
### Features ### Features
Supported functionality in this package includes: Supported functionality in this package includes:
+133 -735
View File
File diff suppressed because it is too large Load Diff
+2 -3
View File
@@ -1,6 +1,6 @@
{ {
"name": "node-red-contrib-matrix-chat", "name": "node-red-contrib-matrix-chat",
"version": "0.8.0", "version": "0.9.0",
"description": "Matrix chat server client for Node-RED", "description": "Matrix chat server client for Node-RED",
"dependencies": { "dependencies": {
"abort-controller": "^3.0.0", "abort-controller": "^3.0.0",
@@ -9,12 +9,11 @@
"got": "^12.0.2", "got": "^12.0.2",
"image-size": "^1.0.2", "image-size": "^1.0.2",
"isomorphic-webcrypto": "^2.3.8", "isomorphic-webcrypto": "^2.3.8",
"matrix-js-sdk": "^28.0.0", "matrix-js-sdk": "34.11.1",
"mime": "^3.0.0", "mime": "^3.0.0",
"node-fetch": "^3.3.0", "node-fetch": "^3.3.0",
"node-localstorage": "^2.2.1", "node-localstorage": "^2.2.1",
"olm": "https://gitlab.matrix.org/matrix-org/olm/-/package_files/2572/download", "olm": "https://gitlab.matrix.org/matrix-org/olm/-/package_files/2572/download",
"request": "^2.88.2",
"sharp": "^0.33.4", "sharp": "^0.33.4",
"tmp": "^0.2.1", "tmp": "^0.2.1",
"utf8": "^3.0.0" "utf8": "^3.0.0"
+10 -18
View File
@@ -19,14 +19,18 @@
}, },
oneditprepare: function() { oneditprepare: function() {
$("#node-input-roomId").typedInput({ $("#node-input-roomId").typedInput({
type: this.roomIdType, types: ['msg','flow','global','str'],
types:['msg','flow','global','str'], typeField: "#node-input-roomId"
}).typedInput('value', this.roomIdValue); });
$("#node-input-roomId").typedInput("type", this.roomIdType || "msg");
$("#node-input-roomId").typedInput("value", this.roomIdValue || "topic");
$("#node-input-eventId").typedInput({ $("#node-input-eventId").typedInput({
type: this.eventIdType, types: ['msg','flow','global','str'],
types:['msg','flow','global','str'], typeField: "#node-input-eventId"
}).typedInput('value', this.eventIdValue); });
$("#node-input-eventId").typedInput("type", this.eventIdType || "msg");
$("#node-input-eventId").typedInput("value", this.eventIdValue || "eventId");
}, },
oneditsave: function() { oneditsave: function() {
this.roomIdType = $("#node-input-roomId").typedInput('type'); this.roomIdType = $("#node-input-roomId").typedInput('type');
@@ -58,18 +62,6 @@
<label for="node-input-eventId"><i class="fa fa-file"></i> Event ID</label> <label for="node-input-eventId"><i class="fa fa-file"></i> Event ID</label>
<input type="text" id="node-input-eventId"> <input type="text" id="node-input-eventId">
</div> </div>
<script type="text/javascript">
$(function(){
$("#node-input-roomId").on("keyup", function() {
if($(this).val() && !$(this).val().startsWith("!")) {
$("#node-input-roomId-error").html(`Room IDs start with exclamation point "!"<br />Example: !OGEhHVWSdvArJzumhm:matrix.org`).show();
} else {
$("#node-input-roomId-error").hide();
}
}).trigger('keyup');
});
</script>
</script> </script>
<script type="text/html" data-help-name="matrix-get-event"> <script type="text/html" data-help-name="matrix-get-event">
+2 -5
View File
@@ -7,7 +7,6 @@ const { resolve } = require('path');
const { LocalStorage } = require('node-localstorage'); const { LocalStorage } = require('node-localstorage');
const { LocalStorageCryptoStore } = require('matrix-js-sdk/lib/crypto/store/localStorage-crypto-store'); const { LocalStorageCryptoStore } = require('matrix-js-sdk/lib/crypto/store/localStorage-crypto-store');
const {RoomEvent, RoomMemberEvent, HttpApiEvent, ClientEvent, MemoryStore} = require("matrix-js-sdk"); const {RoomEvent, RoomMemberEvent, HttpApiEvent, ClientEvent, MemoryStore} = require("matrix-js-sdk");
const request = require("request");
require("abort-controller/polyfill"); // polyfill abort-controller if we don't have it require("abort-controller/polyfill"); // polyfill abort-controller if we don't have it
if (!globalThis.fetch) { if (!globalThis.fetch) {
// polyfill fetch if we don't have it // polyfill fetch if we don't have it
@@ -154,8 +153,7 @@ module.exports = function(RED) {
localStorage: localStorage, localStorage: localStorage,
}), }),
userId: this.userId, userId: this.userId,
deviceId: (this.deviceId || getStoredDeviceId(localStorage)) || undefined, deviceId: (this.deviceId || getStoredDeviceId(localStorage)) || undefined
request
// verificationMethods: ["m.sas.v1"] // verificationMethods: ["m.sas.v1"]
}); });
@@ -481,8 +479,7 @@ module.exports = function(RED) {
baseUrl: baseUrl, baseUrl: baseUrl,
deviceId: deviceId, deviceId: deviceId,
timelineSupport: true, timelineSupport: true,
localTimeoutMs: '30000', localTimeoutMs: '30000'
request
}); });
new TimelineWindow() new TimelineWindow()