mirror of
https://github.com/Skylar-Tech/node-red-contrib-matrix-chat.git
synced 2026-05-25 00:23:39 -06:00
Add Send Location example flow
This commit is contained in:
@@ -183,6 +183,19 @@ Any messages containing "delete" will be removed by the client.
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Send a location to a room</summary>
|
||||||
|
|
||||||
|
[View JSON](send-location-to-room.json)
|
||||||
|
|
||||||
|
Sends an `m.location` event (a map pin) for the country of Norway to the configured room. Element and other matrix-react-sdk clients render it as a pin on the map with the label *"Norway"*; clients without map rendering see an auto-generated text fallback.
|
||||||
|
|
||||||
|
Update the `Send Location` node's Room ID to your own room before deploying. The inject node is configured to fire a bare message (no payload, no topic), so the Send Location node falls back to its configured values for everything: asset type `m.pin`, description `Norway`, and geo URI `geo:60.4720,8.4689`.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
### Event Handling
|
### Event Handling
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": "222bb5ef43d621b4",
|
||||||
|
"type": "group",
|
||||||
|
"z": "f025a8b9fbd1b054",
|
||||||
|
"name": "Send location to room",
|
||||||
|
"style": {
|
||||||
|
"label": true
|
||||||
|
},
|
||||||
|
"nodes": [
|
||||||
|
"ee742dfa934b4892",
|
||||||
|
"1ef540382789ff9d"
|
||||||
|
],
|
||||||
|
"x": 354,
|
||||||
|
"y": 5279,
|
||||||
|
"w": 392,
|
||||||
|
"h": 82
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "ee742dfa934b4892",
|
||||||
|
"type": "matrix-send-location",
|
||||||
|
"z": "f025a8b9fbd1b054",
|
||||||
|
"g": "222bb5ef43d621b4",
|
||||||
|
"name": "",
|
||||||
|
"server": "",
|
||||||
|
"roomId": "!example:test.org",
|
||||||
|
"latitudeType": "msg",
|
||||||
|
"latitudeValue": "latitude",
|
||||||
|
"longitudeType": "msg",
|
||||||
|
"longitudeValue": "longitude",
|
||||||
|
"altitudeType": "msg",
|
||||||
|
"altitudeValue": "altitude",
|
||||||
|
"geoUriType": "str",
|
||||||
|
"geoUriValue": "geo:60.4720,8.4689",
|
||||||
|
"descriptionType": "str",
|
||||||
|
"descriptionValue": "Norway",
|
||||||
|
"assetTypeType": "str",
|
||||||
|
"assetTypeValue": "m.pin",
|
||||||
|
"timestampType": "msg",
|
||||||
|
"timestampValue": "timestamp",
|
||||||
|
"textType": "msg",
|
||||||
|
"textValue": "payload",
|
||||||
|
"x": 640,
|
||||||
|
"y": 5320,
|
||||||
|
"wires": [
|
||||||
|
[],
|
||||||
|
[]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1ef540382789ff9d",
|
||||||
|
"type": "inject",
|
||||||
|
"z": "f025a8b9fbd1b054",
|
||||||
|
"g": "222bb5ef43d621b4",
|
||||||
|
"name": "",
|
||||||
|
"props": [],
|
||||||
|
"repeat": "",
|
||||||
|
"crontab": "",
|
||||||
|
"once": false,
|
||||||
|
"onceDelay": 0.1,
|
||||||
|
"x": 460,
|
||||||
|
"y": 5320,
|
||||||
|
"wires": [
|
||||||
|
[
|
||||||
|
"ee742dfa934b4892"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 8.9 KiB |
Reference in New Issue
Block a user