From de3c58044ffd42455cfadf79297249ab928331fa Mon Sep 17 00:00:00 2001 From: Skylar Sadlier Date: Thu, 17 Mar 2022 14:40:53 -0600 Subject: [PATCH] Add example for delete-event node --- examples/README.md | 11 ++++++ examples/delete-event.json | 73 +++++++++++++++++++++++++++++++++++++ examples/delete-event.png | Bin 0 -> 10965 bytes 3 files changed, 84 insertions(+) create mode 100644 examples/delete-event.json create mode 100644 examples/delete-event.png 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 0000000000000000000000000000000000000000..12f889f5356766d539fddc3f366caf9b74690049 GIT binary patch literal 10965 zcmdsdWmp?s+bz-}#X@Our$}*%y9F!73KS>~5AMYZ#oZ}VT!WUPh2rkTB{(Ix1SbR! zoV3sTz4CqM*ExUAb#l#>YcjKE-#csHbI)FDR;0SB0^SqyCnzW=cuI=Ew|;3F5DkXtcG zt*GJ5v6iQ{uhWdqjQGqTfyBd|EBrHYni|1K3Fh`RI&3fS`n=PpD?h^Sx1C`f=Akl|5dX97U_eeM z6=>31l|LfBP?)r@c7jw_c0N5IE+1RHe*L7VsAw{gQQ5jL>ba@l3>|Vr+K#dvW22)* zSy_}fdnLIc{w_<#Jh{|v*Sg@Jw?5(cRG`hxzZM&uXnf%_I)pU@5?4}p7Tl!T1Pbxg zMF$7=bO(;NY}?bpoJi=sa=CbTctAn;<{DPqWdgJZX*Df}RmjxtXb>sw>`$1zSTD~T+ZH0xv|7^l6 z*iZ_haQqWOV%4}hb48_b?*V1|ch(?d5W8ap6LMCU?)Utj`TxyL?GpEi!53sSOeY#swDWGc1aD_Sy3WDQnYr@W24jW8RHVS zF{)WYbVF!7;iXQHc0)08%r%{HoeFv&V&&6uQBV*XoO=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