Open Kukks opened 5 years ago
addpin:{"userid":"the user id ", "pin": "your pin code"}
Generates a pin for the specified userchangepin:{"Pin": "your pin code"}
Generates a new pin for yourself( you must already have a pin)
*sendupdate:{"Pin":"your pin code", "Event": "TestEvent", "Title": "Testing An Automated Update Flow", "Message": "This message was sent as part of an automated streamlined process to notify anyone of updates as needed\nnew line started here"}
Sends an update to the #updates channel and then to all relevant subscriptionsupdatesubscribe:{ "event": "event type to subscribe to only. leave blank for all events", "WebhookUrl" :"https://btcpaywasupdated.com/?event={event}&title={title}&message={message}" }
subscribe to updates! This will post a GET request to where you specify. Additionally it will replace {event}
{title}
and message
with the update details. The event parameter should be set to only trigger the web request on a specific event. The bot will send you the id of this subscriptionupdateunsubscribe:subscriptionid
The bot will unsubscribe your web request Simplest flow • user joins slack • Automatically added to #updates • User will receive updates there by default
Btcpay Host flow • User sets up btcpay • User goes to Server Settings • User enters email and subscribes to mailing list • User will receive updates by emails through mailing list
Advanced Flow
• User joins slack
• User wants to hook some internal systems so that his btcpayserver is automatically updated on critical updates
• User messages @Roger Ver:
updatesubscribe:{ "event": "btcpayserver-update-critical", "WebhookUrl" :"http://mycompany.com/internal/run-btcpayupdate" }
(edited)
Those are the user flows
Posting an update Workflow:
send sendupdate:{"Pin":"your pin code", "Event": "TestEvent", "Title": "Testing An Automated Update Flow", "Message": "This message was sent as part of an automated streamlined process to notify anyone of updates as needed\nnew line started here"}
to @Roger Ver
We need to make the bot able to accept a message so that it can post updates to the #updates channel and to the IFTT platform.
Message format in json for easy parsing:
Bot should post in #updates for us with formatted message from above.
Bot should also be able to listen to the following message:
where
event
can be * to not filter events and url{}
sections get replaced by actual value(url encoded)You can guess what that does otherwise :P It should also return to the user an id that the user can just send back to bot:
to cancel the subscription
With this in place, users can subscribe to whatever they want using the webhook, and at btcpayserver, we can use the webhook with IFTT to forward the update to Twitter, Mastodon and Mailgun to send an email to a mailing list