magnetocassette/flow.json
2023-08-18 11:17:39 +02:00

296 lines
7.9 KiB
JSON

[
{
"id": "38336e80fa6d36cf",
"type": "tab",
"label": "Matrix bot for YunoHost",
"disabled": false,
"info": "",
"env": []
},
{
"id": "380636013adee302",
"type": "matrix-receive",
"z": "38336e80fa6d36cf",
"name": "",
"server": "05634acf4f865805",
"roomId": "!gvRsI7cG1o9SVr56:pijean.ovh,!oUChrIGPjhUkpgjYCW:matrix.org,!PauySEslPVuJCJCwlZ:matrix.org",
"acceptText": false,
"acceptEmotes": false,
"acceptStickers": false,
"acceptReactions": true,
"acceptFiles": false,
"acceptAudio": false,
"acceptImages": false,
"acceptVideos": false,
"acceptLocations": false,
"x": 100,
"y": 20,
"wires": [
[
"5188505e3ca2f236",
"04159392a1a12315"
]
]
},
{
"id": "12892243c42d4f8b",
"type": "delay",
"z": "38336e80fa6d36cf",
"name": "",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "5",
"rateUnits": "minute",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 420,
"y": 140,
"wires": [
[
"34807ea76b32dabc"
]
]
},
{
"id": "34807ea76b32dabc",
"type": "matrix-send-message",
"z": "38336e80fa6d36cf",
"name": "Send message",
"server": "05634acf4f865805",
"roomId": "",
"message": "",
"messageType": "m.notice",
"messageFormat": "html",
"replaceMessage": false,
"x": 420,
"y": 200,
"wires": [
[
"eae67ba5a47e1716"
],
[
"eae67ba5a47e1716"
]
]
},
{
"id": "fb2cbb5873d95da5",
"type": "comment",
"z": "38336e80fa6d36cf",
"name": "Rooms",
"info": "!gvRsI7cG1o9SVr56:pijean.ovh --- Support room\n!oUChrIGPjhUkpgjYCW:matrix.org --- Dev room\n!PauySEslPVuJCJCwlZ:matrix.org --- Apps devs room",
"x": 90,
"y": 320,
"wires": []
},
{
"id": "59b45f4949797dbd",
"type": "matrix-join-room",
"z": "38336e80fa6d36cf",
"name": "Join support room",
"server": "05634acf4f865805",
"x": 450,
"y": 400,
"wires": [
[
"8570084d3cded973"
],
[
"8570084d3cded973"
]
]
},
{
"id": "53f4392f5cb5b0d7",
"type": "inject",
"z": "38336e80fa6d36cf",
"name": "",
"props": [
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "!gvRsI7cG1o9SVr56:pijean.ovh",
"x": 170,
"y": 360,
"wires": [
[
"59b45f4949797dbd"
]
]
},
{
"id": "3293752a110a9553",
"type": "inject",
"z": "38336e80fa6d36cf",
"name": "",
"props": [
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "!oUChrIGPjhUkpgjYCW:matrix.org",
"x": 180,
"y": 400,
"wires": [
[
"59b45f4949797dbd"
]
]
},
{
"id": "98bf789b900b430b",
"type": "inject",
"z": "38336e80fa6d36cf",
"name": "",
"props": [
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "!PauySEslPVuJCJCwlZ:matrix.org",
"x": 180,
"y": 440,
"wires": [
[
"59b45f4949797dbd"
]
]
},
{
"id": "e8fd834180b04f15",
"type": "link in",
"z": "38336e80fa6d36cf",
"name": "link in 1",
"links": [
"8570084d3cded973",
"5188505e3ca2f236",
"eae67ba5a47e1716"
],
"x": 735,
"y": 200,
"wires": [
[
"fa8ff00116e6a0e1"
]
]
},
{
"id": "fa8ff00116e6a0e1",
"type": "debug",
"z": "38336e80fa6d36cf",
"name": "debug",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 830,
"y": 200,
"wires": []
},
{
"id": "8570084d3cded973",
"type": "link out",
"z": "38336e80fa6d36cf",
"name": "link out 2",
"mode": "link",
"links": [
"e8fd834180b04f15"
],
"x": 595,
"y": 400,
"wires": []
},
{
"id": "5188505e3ca2f236",
"type": "link out",
"z": "38336e80fa6d36cf",
"name": "link out 3",
"mode": "link",
"links": [
"e8fd834180b04f15"
],
"x": 595,
"y": 20,
"wires": []
},
{
"id": "eae67ba5a47e1716",
"type": "link out",
"z": "38336e80fa6d36cf",
"name": "link out 4",
"mode": "link",
"links": [
"e8fd834180b04f15"
],
"x": 595,
"y": 200,
"wires": []
},
{
"id": "04159392a1a12315",
"type": "function",
"z": "38336e80fa6d36cf",
"name": "Filter reaction and preparate answer",
"func": "let greeting = \"Hi! To help us volunteers help you, read about <a href=\\\"https://yunohost.org/en/community/help#how-to-ask-for-help\\\">how to ask for help</a>.\" ;\nlet closing = \"Thank you for you patience, and thank you for using YunoHost!\";\nlet message;\n\nswitch(msg.payload){\n case \"🪵\":\n message = \"Notably, if you are getting an error, share its <em>full</em> log by pasting here the link to the page created by the YunoPaste buttons.\";\n break;\n// The ? emoji is actually 2-character-long. Make sure to copy it from the debug log.\n case \"❓️\":\n message = \"Notably, contextualize your problem and explain it plainly.\";\n break;\n case \"🦤\":\n message = \"Notably, directly explain your problem or ask your question.\";\n break;\n case \"🧱\":\n message = \"Notably, explain your problem and avoid sentences like \\\"it does not work\\\". Share any displayed error, use YunoPaste buttons, describe what is not working.\";\n break;\n}\n\nmsg.payload = greeting+\"<br />\"+message+\"<br />\"+closing;\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 270,
"y": 80,
"wires": [
[
"12892243c42d4f8b"
]
]
},
{
"id": "2be1dbf5c78aa986",
"type": "filter",
"z": "38336e80fa6d36cf",
"name": "Filter admins only",
"property": "userId",
"filter": "@titus:pijean\\.ovh|@Alekswag:matrix\\.org|@Bram_:matrix\\.org|@tag:lostpod\\.me|@ericg:matrix\\.org",
"ignorecase": false,
"x": 210,
"y": 140,
"wires": [
[]
]
},
{
"id": "05634acf4f865805",
"type": "matrix-server-config",
"name": "yunohelper bot",
"autoAcceptRoomInvites": true,
"enableE2ee": true,
"global": true
}
]