2023-03-25 17:19:50 +01:00
|
|
|
# hookshot room state configuration
|
|
|
|
|
|
|
|
When Hookshot is configured via the manage integrations menu, it appears to
|
2023-06-08 18:32:54 +02:00
|
|
|
perform two state events with state keys:
|
2023-03-25 17:19:50 +01:00
|
|
|
|
|
|
|
- `uk.half-shot.matrix-hookshot.feed`
|
2023-06-08 18:32:54 +02:00
|
|
|
- state events with state keys that are the feed name
|
2023-03-25 17:19:50 +01:00
|
|
|
- contains the json below
|
|
|
|
- `io.element.integrations.installations`
|
|
|
|
- contains uuid below
|
|
|
|
|
|
|
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
|
|
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
|
|
|
|
|
|
- [feed](#feed)
|
2023-05-05 09:42:11 +02:00
|
|
|
- [Template variations](#template-variations)
|
2023-03-25 17:19:50 +01:00
|
|
|
- [installation](#installation)
|
2023-03-31 16:59:21 +02:00
|
|
|
- [Usage without integration manager](#usage-without-integration-manager)
|
2023-03-25 17:19:50 +01:00
|
|
|
|
|
|
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
## feed
|
|
|
|
|
|
|
|
This entry is the feed url e.g.
|
|
|
|
`https://feeds.yle.fi/uutiset/v1/recent.rss?publisherIds=YLE_NEWS`, and
|
|
|
|
contains:
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"label": "YLE News in English",
|
2023-05-05 09:42:11 +02:00
|
|
|
"template": "$FEEDTITLE: $AUTHOR $LINK ($DATE) $SUMMARY",
|
2023-03-25 17:19:50 +01:00
|
|
|
"url": "https://feeds.yle.fi/uutiset/v1/recent.rss?publisherIds=YLE_NEWS"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2023-04-28 08:07:26 +02:00
|
|
|
- `"template"` is optional and defaults to `New post in $FEEDNAME: $LINK`
|
2023-05-05 09:42:11 +02:00
|
|
|
- Note: `$LINK` actually means `[$TITLE](LINK)`. `$URL` is just the link.
|
2023-04-28 08:07:26 +02:00
|
|
|
- [Upstream documentation](https://matrix-org.github.io/matrix-hookshot/latest/setup/feeds.html#feed-templates)
|
|
|
|
|
2023-05-05 09:42:11 +02:00
|
|
|
### Template variations
|
|
|
|
|
|
|
|
This contains the whole JSON line to easen copy-pasting as my events are missing it entirely.
|
|
|
|
|
|
|
|
- default: `"template": "New post in $FEEDNAME: $LINK",`
|
|
|
|
- Matrix: `"template": "$FEEDTITLE: $AUTHOR $LINK ($DATE) $SUMMARY",`
|
2023-05-08 12:49:19 +02:00
|
|
|
- IRC: `"template": "$URL $FEEDTITLE: $TITLE $AUTHOR ($DATE) $SUMMARY",`
|
2023-05-05 09:42:11 +02:00
|
|
|
|
2023-03-25 17:19:50 +01:00
|
|
|
## installation
|
|
|
|
|
|
|
|
This probably has or should be left for the integration manager.
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"appId": "hookshot-feeds",
|
|
|
|
"installationId": "uuid-goes-here",
|
|
|
|
"userIds": ["@feeds:integrations.ems.host"],
|
|
|
|
"widgetIds": []
|
|
|
|
}
|
|
|
|
```
|
2023-03-31 16:59:21 +02:00
|
|
|
|
|
|
|
## Usage without integration manager
|
|
|
|
|
|
|
|
Hookshot appears to answer `/invite @feeds:integrations.ems.host` and
|
|
|
|
`!feeds help` so it will hopefully work without having to touch an
|
|
|
|
integration manager for benefit of Element iOS users.
|
|
|
|
|
|
|
|
Note that the bot will likely require power level to touch room state so
|
|
|
|
it will in most cases require power level 50.
|
2023-04-05 11:21:21 +02:00
|
|
|
|
|
|
|
For reference the list of commands:
|
|
|
|
|
|
|
|
- `!feeds feed <url> [label]` - Bridge an RSS/Atom feed to the room.
|
|
|
|
- `!feeds feed list` - Show feeds currently subscribed to.
|
|
|
|
- `!feeds feed remove <url>` - Unsubscribe from an RSS/Atom feed.
|
|
|
|
- `!feeds setup-widget` - Open the setup widget in the room
|
|
|
|
- `!feeds help` - This help text
|