Skip to content
Snippets Groups Projects
Verified Commit 6d666b17 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Add note about external content URLs to readme

parent 541838b0
No related branches found
No related tags found
No related merge requests found
Pipeline #7317 passed
......@@ -52,6 +52,8 @@ have been made to the map concepts.
the Work Adventure client API, the
[Matrix Widget API](https://github.com/matrix-org/matrix-widget-api)
is available to scripts
* **Resources**: Resources like images, tilesets, and media can be
referenced using `mxc://` URLs
## Managing game and maps in a room
......@@ -99,6 +101,29 @@ Care should be taken when referencing such maps from other maps in the room, or
using such maps as starting map in the widget. Users could abuse this possibility
to add inappropriate content or even scripts that introduce security risks.
#### Referencing URLs to maps
Instead of loading the entire map JSON into the room state, maps can be referenced
as URLs.
To link an external map to a map name, simply put a JSON object containing
only the key `url`:
```sh
curl \
-X PUT \
-H "Authorization: Bearer AccessToken" \
-H "Content-Type: application/json" \
-d "{'url': 'https://example.com/mymap.json'} \
https://matrix.org/_matrix/client/r0/rooms/%21roomid%3Amatrix.org/state/team.auglement.augmentile.map/mymap
```
URLs can also be used everywhere else where maps are referenced, e.g. in `exitUrl` in other
maps or in URL parameters of Aug\[m\]entile.
Apart from regular `https://` URLs, `mxc://` URLs are also allowed to reference files uploaded
as media to Matrix.
### Adding the game as room widget
Using the Element client, the widget can be added with the `/addwidget` command.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment