node-red-contrib-matrix-cha.../examples/store-received-files.json
Skylar Sadlier 6dd2ec75f0 - 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
2022-02-09 12:13:27 -07:00

166 lines
2.8 KiB
JSON

[
{
"id": "d7573ed76980dc64",
"type": "matrix-receive",
"z": "f025a8b9fbd1b054",
"name": "",
"server": null,
"roomId": "",
"acceptText": false,
"acceptEmotes": false,
"acceptStickers": false,
"acceptReactions": false,
"acceptFiles": true,
"acceptImages": true,
"x": 1740,
"y": 600,
"wires": [
[
"4d4e992ed895413f"
]
]
},
{
"id": "addcccdfea9935b1",
"type": "comment",
"z": "f025a8b9fbd1b054",
"name": "Download & store received files/images and decrypt if necessary",
"info": "",
"x": 1970,
"y": 560,
"wires": []
},
{
"id": "4d4e992ed895413f",
"type": "switch",
"z": "f025a8b9fbd1b054",
"name": "",
"property": "encrypted",
"propertyType": "msg",
"rules": [
{
"t": "true"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 1890,
"y": 600,
"wires": [
[
"660782188696fc62"
],
[
"857bce169036e3cb"
]
]
},
{
"id": "660782188696fc62",
"type": "matrix-decrypt-file",
"z": "f025a8b9fbd1b054",
"name": null,
"x": 2050,
"y": 600,
"wires": [
[
"cdbaf88f6631322e"
],
[]
]
},
{
"id": "b62db6caf4697242",
"type": "file",
"z": "f025a8b9fbd1b054",
"name": "",
"filename": "",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 2240,
"y": 660,
"wires": [
[]
]
},
{
"id": "857bce169036e3cb",
"type": "http request",
"z": "f025a8b9fbd1b054",
"name": "",
"method": "GET",
"ret": "bin",
"paytoqs": "ignore",
"url": "",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"senderr": false,
"x": 1910,
"y": 660,
"wires": [
[
"7d0be52f8c3f1b54"
]
]
},
{
"id": "7d0be52f8c3f1b54",
"type": "switch",
"z": "f025a8b9fbd1b054",
"name": "",
"property": "statusCode",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "200",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 2050,
"y": 660,
"wires": [
[
"cdbaf88f6631322e"
]
]
},
{
"id": "cdbaf88f6631322e",
"type": "change",
"z": "f025a8b9fbd1b054",
"name": "set directory",
"rules": [
{
"t": "set",
"p": "filename",
"pt": "msg",
"to": "\"downloads/\" & msg.filename",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2230,
"y": 600,
"wires": [
[
"b62db6caf4697242"
]
]
}
]