node-red-contrib-matrix-cha.../examples/respond-users-list.json
Skylar Sadlier 2c4621e293 - Fixed not being able to disable e2ee
- Session.logged_out events are now processed to display an error from the node (helps user figure out why their login failed).
- Update description for matrix-server-config
- Updated readme & examples
2021-08-30 19:21:02 -06:00

103 lines
2.0 KiB
JSON

[
{
"id": "a9b412957063b06c",
"type": "matrix-receive",
"z": "f025a8b9fbd1b054",
"name": "",
"roomId": "",
"ignoreText": false,
"ignoreReactions": false,
"ignoreFiles": false,
"ignoreImages": false,
"x": 460,
"y": 120,
"wires": [
[
"4aa45cd8653ba898"
]
]
},
{
"id": "4aa45cd8653ba898",
"type": "switch",
"z": "f025a8b9fbd1b054",
"name": "msg.payload == \"users\"",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "users",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 670,
"y": 120,
"wires": [
[
"b95a674179d93416"
]
]
},
{
"id": "b95a674179d93416",
"type": "matrix-synapse-users",
"z": "f025a8b9fbd1b054",
"name": "",
"x": 890,
"y": 120,
"wires": [
[
"19b654e5f28d93c4"
],
[]
]
},
{
"id": "8720c66e867f89f6",
"type": "matrix-send-message",
"z": "f025a8b9fbd1b054",
"name": "Send HTML Notice",
"roomId": "",
"messageType": "m.notice",
"messageFormat": "html",
"x": 1230,
"y": 120,
"wires": [
[],
[]
]
},
{
"id": "19b654e5f28d93c4",
"type": "function",
"z": "f025a8b9fbd1b054",
"name": "",
"func": "let new_payload = '<ul>';\nmsg.payload.users.forEach(function(user, index){\n new_payload += '<li>'+ JSON.stringify(user, null, 2).replace(/(?:\\r\\n|\\r|\\n)/g, \"\\n<br>\"); + '</li>'\n});\nmsg.payload = new_payload + '</ul>';\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1060,
"y": 120,
"wires": [
[
"8720c66e867f89f6"
]
]
},
{
"id": "563da45ab1747c2b",
"type": "comment",
"z": "f025a8b9fbd1b054",
"name": "Response to \"users\" with full server user list",
"info": "",
"x": 550,
"y": 80,
"wires": []
}
]