diff --git a/examples/README.md b/examples/README.md index c418e6b..5456690 100644 --- a/examples/README.md +++ b/examples/README.md @@ -15,6 +15,7 @@ Build something cool with these nodes? Feel free to submit a pull request to sha - [Respond to "image" with an uploaded image](#respond-to-image-with-an-uploaded-image) - [Respond to "file" with an uploaded file](#respond-to-file-with-an-uploaded-file) - [Respond to "react" with a reaction](#respond-to-react-with-a-reaction) +- [Remove messages containing "delete"](#remove-messages-containing-delete) - [Respond to "users" with full list of server users](#respond-to-users-with-full-list-of-server-users) - [Respond to "newroom" by creating new room and inviting user](#respond-to-newroom-by-creating-new-room-and-inviting-user) - [Respond to "joinroom " by joining mentioned room](#respond-to-joinroom-room_id_or_alias-by-joining-mentioned-room) @@ -110,6 +111,16 @@ Give a 👍 reaction when someone says "react" +### Remove messages containing "delete" + +[View JSON](delete-event.json) + +Any messages containing "delete" will try to be removed by the client. + +![respond-react-with-reaction.png](delete-event.png) + + + ### Respond to "users" with full list of server users [View JSON](respond-users-list.json) diff --git a/examples/delete-event.json b/examples/delete-event.json new file mode 100644 index 0000000..aaf46f8 --- /dev/null +++ b/examples/delete-event.json @@ -0,0 +1,73 @@ +[ + { + "id": "fed9197df27197a4", + "type": "matrix-receive", + "z": "f025a8b9fbd1b054", + "name": "", + "server": null, + "roomId": "", + "acceptText": true, + "acceptEmotes": true, + "acceptStickers": true, + "acceptReactions": true, + "acceptFiles": true, + "acceptImages": true, + "x": 340, + "y": 1560, + "wires": [ + [ + "b289bb4fed9fa166" + ] + ] + }, + { + "id": "b289bb4fed9fa166", + "type": "switch", + "z": "f025a8b9fbd1b054", + "name": "", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "cont", + "v": "delete", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 1, + "x": 490, + "y": 1560, + "wires": [ + [ + "48766b632ab2e6a1" + ] + ] + }, + { + "id": "48766b632ab2e6a1", + "type": "matrix-delete-event", + "z": "f025a8b9fbd1b054", + "name": "", + "server": null, + "roomId": "", + "reason": "Requested deletion", + "x": 630, + "y": 1560, + "wires": [ + [], + [] + ] + }, + { + "id": "11f9cbbed7b95c83", + "type": "comment", + "z": "f025a8b9fbd1b054", + "name": "Delete messages containing \"delete\"", + "info": "", + "x": 480, + "y": 1520, + "wires": [] + } +] \ No newline at end of file diff --git a/examples/delete-event.png b/examples/delete-event.png new file mode 100644 index 0000000..12f889f Binary files /dev/null and b/examples/delete-event.png differ