Fork for RSS consumer
This commit is contained in:
parent
24f6f25506
commit
c7b214387d
4 changed files with 15 additions and 16 deletions
|
@ -15,15 +15,10 @@ allowed_regions:
|
||||||
|
|
||||||
# Bot-specific configurations per region
|
# Bot-specific configurations per region
|
||||||
region_configs:
|
region_configs:
|
||||||
arizona:
|
__global__: true
|
||||||
# Where and how the plugin will send the data to
|
arizona: true
|
||||||
server_url: "https://ntfy.sh"
|
california: true
|
||||||
server_topic: "changeme"
|
somethingyoudontwantanrssfor: true
|
||||||
|
|
||||||
# If the plugin should use a username and password to send notifications
|
|
||||||
server_use_authentication: true
|
|
||||||
server_username: "no"
|
|
||||||
server_password: "way"
|
|
||||||
|
|
||||||
# If this bot should send a reaction to the message
|
# If this bot should send a reaction to the message
|
||||||
# if the notification was successful
|
# if the notification was successful
|
||||||
|
|
|
@ -15,7 +15,7 @@ class Config(BaseProxyConfig):
|
||||||
helper.copy("region_configs")
|
helper.copy("region_configs")
|
||||||
helper.copy("send_reaction")
|
helper.copy("send_reaction")
|
||||||
|
|
||||||
class ConsumerNTFY(Plugin):
|
class ConsumerRSS(Plugin):
|
||||||
# Get configuration at startup
|
# Get configuration at startup
|
||||||
async def start(self) -> None:
|
async def start(self) -> None:
|
||||||
self.config.load_and_update()
|
self.config.load_and_update()
|
||||||
|
@ -34,7 +34,7 @@ class ConsumerNTFY(Plugin):
|
||||||
# Check that config value exists
|
# Check that config value exists
|
||||||
if not self.config["allowed_regions"]: return False
|
if not self.config["allowed_regions"]: return False
|
||||||
# Check that region is allowed
|
# 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
|
# All senders allowed for this region
|
||||||
if len(self.config["allowed_regions"][region]) == 0: return True
|
if len(self.config["allowed_regions"][region]) == 0: return True
|
||||||
# Check that sender is allowed for region
|
# Check that sender is allowed for region
|
|
@ -1,10 +1,12 @@
|
||||||
maubot: 0.1.0
|
maubot: 0.1.0
|
||||||
id: org.fiftyfiftyonearizona.reports.consumerntfy
|
id: org.fiftyfiftyonearizona.reports.consumerrss
|
||||||
version: 1.1.0
|
version: 1.1.0
|
||||||
license: MIT
|
license: MIT
|
||||||
modules:
|
modules:
|
||||||
- consumerntfy
|
- consumerrss
|
||||||
main_class: ConsumerNTFY
|
main_class: ConsumerRSS
|
||||||
config: true
|
config: true
|
||||||
|
database: true
|
||||||
|
webapp: true
|
||||||
extra_files:
|
extra_files:
|
||||||
- base-config.yaml
|
- base-config.yaml
|
|
@ -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
|
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.
|
Loading…
Add table
Add a link
Reference in a new issue