Fork for RSS consumer

This commit is contained in:
Ben 2025-06-26 16:40:49 -07:00
parent 24f6f25506
commit c7b214387d
Signed by: webmaster
GPG key ID: A5FCBAF34E6E8B50
4 changed files with 15 additions and 16 deletions

View file

@ -15,15 +15,10 @@ allowed_regions:
# Bot-specific configurations per region
region_configs:
arizona:
# Where and how the plugin will send the data to
server_url: "https://ntfy.sh"
server_topic: "changeme"
# If the plugin should use a username and password to send notifications
server_use_authentication: true
server_username: "no"
server_password: "way"
__global__: true
arizona: true
california: true
somethingyoudontwantanrssfor: true
# If this bot should send a reaction to the message
# if the notification was successful

View file

@ -15,7 +15,7 @@ class Config(BaseProxyConfig):
helper.copy("region_configs")
helper.copy("send_reaction")
class ConsumerNTFY(Plugin):
class ConsumerRSS(Plugin):
# Get configuration at startup
async def start(self) -> None:
self.config.load_and_update()
@ -34,7 +34,7 @@ class ConsumerNTFY(Plugin):
# Check that config value exists
if not self.config["allowed_regions"]: return False
# Check that region is allowed
if not self.config["allowed_regions"][region]: return False
if not region in self.config["allowed_regions"]: return False
# All senders allowed for this region
if len(self.config["allowed_regions"][region]) == 0: return True
# Check that sender is allowed for region

View file

@ -1,10 +1,12 @@
maubot: 0.1.0
id: org.fiftyfiftyonearizona.reports.consumerntfy
id: org.fiftyfiftyonearizona.reports.consumerrss
version: 1.1.0
license: MIT
modules:
- consumerntfy
main_class: ConsumerNTFY
- consumerrss
main_class: ConsumerRSS
config: true
database: true
webapp: true
extra_files:
- base-config.yaml

View file

@ -1,5 +1,7 @@
# FiftyFiftyOneArizona's Matrix-Based Reporting System, NTFY Consumer
# FiftyFiftyOneArizona's Matrix-Based Reporting System, RSS Consumer
Please see https://git.fiftyfiftyonearizona.org/webmaster/matrix-report-documentation
This plugin supports whitelisting state/territory designators, allowed senders, reaction receipt, and authenticated NTFY posting.
This plugin supports whitelisting state/territory designators, allowed senders, and reaction receipts. It also has separate RSS feeds for each reigon, and a global feed.
Feeds will be available at `http://your.maubot.instance/_matrix/maubot/plugin/<instance ID>/<reigon>.rss`. where `reigon` is non-case-sensitive. Please see https://docs.mau.fi/maubot/dev/handlers/web.html to double check what this path should be exactly.