- Reduce margin between checkboxes for matrix-receive node

- matrix-send-message node can now be used to reply in a thread (closes #104)
- matrix-receive node now returns msg.mentions for easier access to who was mentioned in message
- matrix-receive node now returns boolean msg.isThread based on whether the message is a thread reply or not
This commit is contained in:
2023-11-25 05:38:09 -07:00
parent fd174e32ff
commit 000c28e3b8
5 changed files with 85 additions and 22 deletions
+20 -2
View File
@@ -6,6 +6,7 @@
outputLabels: ["success", "error"],
inputs:1,
outputs:2,
paletteLabel: 'Send Message',
defaults: {
name: { value: null },
server: { type: "matrix-server-config" },
@@ -13,12 +14,24 @@
message: { value: null },
messageType: { value: 'm.text' },
messageFormat: { value: '' },
replaceMessage : { value: false }
replaceMessage : { value: false },
threadReplyType: { value: "msg" },
threadReplyValue: { value: "isThread" },
},
label: function() {
return this.name || "Send Message";
},
paletteLabel: 'Send Message'
oneditprepare: function() {
$("#node-input-threadReply").typedInput({
types:['msg','flow','global','bool'],
})
.typedInput('value', this.threadReplyValue || "isThread")
.typedInput('type', this.threadReplyType || "msg");
},
oneditsave: function() {
this.threadReplyType = $("#node-input-threadReply").typedInput('type');
this.threadReplyValue = $("#node-input-threadReply").typedInput('value');
},
});
</script>
@@ -72,6 +85,11 @@
It's recommended to use m.notice for bots because the message will render in a lighter text (at least in Element client) for users to distinguish bot and real user messages.
</div>
<div class="form-row">
<label for="node-input-threadReply"><i class="fa fa-commenting-o"></i> Thread Reply</label>
<input type="text" id="node-input-threadReply">
</div>
<div class="form-row">
<label for="node-input-messageFormat">
Message Format