You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
node-red-contrib-matrix-cha.../examples/respond-joinroom.json

90 lines
1.8 KiB

- Move client storage to the Node-RED user directory. - Remove mention of Device ID being required for encryption (since it can now auto generate if not provided this could make people think they have to set it when that isn't the case) - matrix-js-sdk updated from ^v15.3.0 to ^v15.5.0 - got updated from ^11.8.2 to ^12.0.1 (this also required us to change how we import this library in code) - Node-RED version requirement added for >=v1.3.0 - NodeJS version requirement added for >=v14.0.0 - removed `process` dependency - send-image node fixed so error doesn't get thrown (`matrix-js-sdk` updated causing some errors) - updated send-image node docs to explain that msg.contentType is necessary for some clients to render the image (otherwise it could display as a blank message in the room). - If a matrix server configuration node was missing it's User ID it would throw a TypeError instead of telling the user the actual issue. - Updated user list example: it now paginates all users on the server (if you had a lot of users the message would fail to send because it was too large) - Added example for creating a room and inviting a user - Added example for joining a mentioned room - Added example for listing out a user's or server's rooms - Added example for getting session data from a user via whois info - Added example for getting a room's user list - Added example for downloading & storing received files/images - Added example for kicking/banning user from a room. - Added example for deactivating a user - Removed message in the room-users config stating it only works if you are an admin - Receive node now outputs `msg.filename` for files and images
3 years ago
[
{
"id": "9a737b0c57b35063",
"type": "switch",
"z": "f025a8b9fbd1b054",
"name": "is from me",
"property": "userId",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "@skylord123:skylar.tech",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 430,
"y": 2020,
"wires": [
[
"2a44927d9317a4b4"
]
]
},
{
"id": "f377ad37af7dc49e",
"type": "matrix-receive",
"z": "f025a8b9fbd1b054",
"name": "",
"server": null,
"roomId": "",
"acceptText": true,
"acceptEmotes": true,
"acceptStickers": true,
"acceptReactions": true,
"acceptFiles": true,
"acceptImages": true,
"x": 260,
"y": 2020,
"wires": [
[
"9a737b0c57b35063"
]
]
},
{
"id": "f7112a1d2808cfbb",
"type": "comment",
"z": "f025a8b9fbd1b054",
"name": "Respond to \"joinroom <room_id_or_alias>\" by joining the mentioned room",
"info": "",
"x": 440,
"y": 1980,
"wires": []
},
{
"id": "2a44927d9317a4b4",
"type": "function",
"z": "f025a8b9fbd1b054",
"name": "msg.payload == \"joinroom\"",
"func": "if(!msg.payload.startsWith(\"joinroom\")) {\n return null;\n}\n\nlet split = msg.payload.split(\" \");\nif(split.length < 2) {\n return; // no room provided\n}\n\nmsg.topic = split[1];\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 640,
"y": 2020,
"wires": [
[
"a34d05c3b6f6bd27"
]
]
},
{
"id": "a34d05c3b6f6bd27",
"type": "matrix-join-room",
"z": "f025a8b9fbd1b054",
"name": "",
"server": null,
"x": 850,
"y": 2020,
"wires": [
[],
[]
]
}
]