Compare commits

..

9 Commits

Author SHA1 Message Date
skylord123 41d0022cf2 Merge e0947dd3bc into 6bbd1d5119 2025-02-03 20:54:49 -07:00
skylord123 e0947dd3bc Merge pull request #128 from wuast94/master
Add m.notice to the receive node
2025-02-03 20:54:40 -07:00
skylord123 8287f3c08a Merge pull request #130 from LokiMidgard/patch-1
Support default plaintext in msg.format
2025-02-03 20:51:43 -07:00
Patrick Kranz 2a78524a90 use hasOwn instead of keys 2025-01-09 15:28:28 +01:00
Patrick Kranz d01838ac84 Fix error 2025-01-09 15:14:50 +01:00
Patrick Kranz 2059f8455d Update matrix-send-message.js 2025-01-09 15:12:09 +01:00
skylord123 0cb8ecf8aa Updated README with a link to a guide that explains how to register users via web browser 2025-01-04 12:58:08 -07:00
Marc 77f2c4be46 Add m.notice to the receive node 2025-01-01 05:17:12 +00:00
skylord123 487241e097 Merge pull request #120 from Skylar-Tech/new-nodes
New nodes
2024-09-18 22:24:25 -06:00
4 changed files with 22 additions and 4 deletions
+4 -2
View File
@@ -59,7 +59,9 @@ Interested in helping? Contributions to finalize E2EE support are welcome!
This module includes a node to register users using the Synapse secret registration endpoint. It returns both an `access_token` and a `device_id`, perfect for setting up the bot.
[See how to register a user here](https://github.com/Skylar-Tech/node-red-contrib-matrix-chat/tree/master/examples#readme).
[Guide on registering a user via the web browser](https://skylar.tech/matrix-chat-bot-module-for-node-red/)
[Guide on registering using shared secret registration](https://github.com/Skylar-Tech/node-red-contrib-matrix-chat/tree/master/examples#readme) (for server owners)
### Other Packages
@@ -69,4 +71,4 @@ This module includes a node to register users using the Synapse secret registrat
We welcome all contributions! Please submit a pull request if you add a feature so the whole community can benefit.
**Sharing is caring!**
**Sharing is caring!**
+11
View File
@@ -13,6 +13,7 @@
acceptOwnEvents: {"value": false},
acceptText: {"value": true},
acceptEmotes: {"value": true},
acceptNotices: {"value": true},
acceptStickers: {"value": true},
acceptReactions: {"value": true},
acceptFiles: {"value": true},
@@ -66,6 +67,16 @@
Accept text <code style="text-transform: none;">m.text</code>
</label>
</div>
<div class="form-row" style="margin-bottom:0;">
<input
type="checkbox"
id="node-input-acceptNotices"
style="width: auto; margin-left: 125px; vertical-align: top"
/>
<label for="node-input-acceptNotices" style="width: auto">
Accept notices <code style="text-transform: none;">m.notice</code>
</label>
</div>
<div class="form-row" style="margin-bottom:0;">
<input
type="checkbox"
+5
View File
@@ -10,6 +10,7 @@ module.exports = function(RED) {
this.acceptOwnEvents = n.acceptOwnEvents;
this.acceptText = n.acceptText;
this.acceptEmotes = n.acceptEmotes;
this.acceptNotices = n.acceptNotices;
this.acceptStickers = n.acceptStickers;
this.acceptReactions = n.acceptReactions;
this.acceptFiles = n.acceptFiles;
@@ -69,6 +70,10 @@ module.exports = function(RED) {
if (!node.acceptEmotes) return;
break;
case 'm.notice':
if (!node.acceptNotices) return;
break;
case 'm.text':
if (!node.acceptText) return;
break;
+2 -2
View File
@@ -127,7 +127,7 @@ module.exports = function(RED) {
}
if(msgFormat === 'msg.format') {
if(!msg.format) {
if(!Object.hasOwn(msg, 'format')) {
node.error("Message format is set to be passed in via msg.format but was not defined", msg);
return;
}
@@ -202,4 +202,4 @@ module.exports = function(RED) {
});
}
RED.nodes.registerType("matrix-send-message", MatrixSendImage);
}
}