2c4621e293
- Session.logged_out events are now processed to display an error from the node (helps user figure out why their login failed). - Update description for matrix-server-config - Updated readme & examples |
||
---|---|---|
.. | ||
add-user-with-admin-user.json | ||
add-user-with-admin-user.png | ||
README.md | ||
respond-file-with-file.json | ||
respond-file-with-file.png | ||
respond-image-with-image.json | ||
respond-image-with-image.png | ||
respond-ping-pong.json | ||
respond-ping-pong.png | ||
respond-react-with-reaction.json | ||
respond-react-with-reaction.png | ||
respond-to-html-with-html.json | ||
respond-to-html-with-html.png | ||
respond-users-list.json | ||
respond-users-list.png | ||
shared-secret-registration.json | ||
shared-secret-registration.png |
Examples
These are examples of what is possible with the node-red-contrib-matrix-chat module for Node-RED
If you want to try any of them out just copy their JSON contents from their .json file and use the hamburger menu in Node-RED to import the flow.
Build something cool with these nodes? Feel free to submit a pull request to share it!
Index
- Create User with Shared Secret Registration
- Create/Edit Synapse User
- Respond to "ping" with "pong"
- Respond to "html" with an HTML message
- Respond to "image" with an uploaded image
- Respond to "file" with an uploaded file
- Respond to "react" with a reaction
- Respond to "users" with full list of server users
Create user with Shared Secret Registration
Use this flow to create users on servers with closed registration. You also use this endpoint to create your first admin user as it is the same as running the local python script on the server. This requires your registration secret from your homeserver.yaml Synapse server configuration file.
Edit the object on the inject node to the user/pass combo you want to create and hit the inject button (to the left of the inject node).
Note: This only works on Synapse servers.
Create/Edit Synapse User
Allows an administrator to create or modify a user account with a specified msg.userId
.
Respond to "ping" with "pong"
Use this flow to respond to anyone that says "ping" with "pong" into the same room.
Respond to "html" with an HTML message
Use this flow to respond to anyone that says "html" with an example HTML message. This shows how easy it is to send HTML.
Respond to "image" with an uploaded image
You will need an image on the machine running Node-RED. In this case example.png exists inside the Node-RED directory.
Respond to "file" with an uploaded file
You will need a file on the machine running Node-RED. In this case sample.pdf exists inside the Node-RED directory.
Respond to "react" with a reaction
Give a 👍 reaction when someone says "react"
Respond to "users" with full list of server users
When someone sends the text "users" they get a HTML message back containing all the current users on the server.
This requires admin privileges.