From 858357c9bcd05a838519970112038514e033bc66 Mon Sep 17 00:00:00 2001 From: Baris Aydek Date: Sun, 18 Aug 2024 17:36:34 +0300 Subject: [PATCH 1/3] Added sequence diagram for github booster to the README --- README.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/README.md b/README.md index cbc8844..7e41afd 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,42 @@ With Nostrize on GitHub, you can: * Earn payments for your pull requests that address and resolve issues. * And more features are coming... +### Nostrize Booster + +Nostrize Booster is designed for GitHub and may be added for other platforms later. + +Nostrize users can make a boost to a github user, organization or a repository for endorsement, to a PR for visibility that more people can see and review it, or to a github issue for again for visibility hoping people would see and share a workaround or fix it. + +```mermaid +sequenceDiagram + autonumber + participant Bob as Bob (User) + participant Extension as Nostrize Extension + participant NostrizeRelay as Nostrize Relay + participant NostrizeNode as Nostrize Lightning Node + participant Alice as Alice (Developer) + + Bob->>Extension: Initiates a boost request + Extension->>NostrizeRelay: Sends zap request to Nostrize
with metadata indicating that the payment is for Alice + NostrizeRelay->>NostrizeNode: Forwards zap request + NostrizeNode-->>Extension: Generates Lightning Invoice + Extension-->>Bob: Displays Lightning Invoice + Bob->>NostrizeNode: Pays the invoice (10000 sats) + NostrizeNode->>Alice: Sends 9600 sats to Alice's wallet + NostrizeNode-->>NostrizeRelay: Confirms payment, creates zap receipt + NostrizeRelay-->>Extension: Sends boost event receipt + Extension-->>Bob: Displays confirmation of boost + NostrizeRelay->>NostrizeRelay: Stores boost request and receipt + + autonumber 1 + + alt Boost Visibility + Other Users->>NostrizeRelay: Fetch boost events + NostrizeRelay-->>Other Users: Return boost events + Extension-->>Other Users: Displays boosts on GitHub homepage + end +``` + ## Telegram Web (web.telegram.org) The latest integration of Nostrize. Add your npub to your bio and you're ready to go! From dbaea5267222fc452356b60409d169b14f9e2f00 Mon Sep 17 00:00:00 2001 From: Baris Aydek Date: Mon, 19 Aug 2024 21:08:47 +0300 Subject: [PATCH 2/3] fix twitter regex for account name --- src/twitter/profile/profile.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/twitter/profile/profile.js b/src/twitter/profile/profile.js index be21be2..0d1f281 100644 --- a/src/twitter/profile/profile.js +++ b/src/twitter/profile/profile.js @@ -19,7 +19,9 @@ async function twitterProfilePage() { const log = logger({ ...settings.debug, namespace: "[N][X-Profile]" }); - const accountName = window.location.href.match(/^https:\/\/x\.com\/(.*)$/)[1]; + const accountName = window.location.href.match( + /^https:\/\/x\.com\/(.*?)(?=\?|\s|$)/, + )[1]; log("accountName", accountName); From b4ef075ceb1f8d2615c43f9c0dde6e347543f3fb Mon Sep 17 00:00:00 2001 From: Baris Aydek Date: Tue, 20 Aug 2024 10:11:06 +0300 Subject: [PATCH 3/3] boost flow fix --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7e41afd..8d997aa 100644 --- a/README.md +++ b/README.md @@ -54,14 +54,13 @@ sequenceDiagram participant Alice as Alice (Developer) Bob->>Extension: Initiates a boost request - Extension->>NostrizeRelay: Sends zap request to Nostrize
with metadata indicating that the payment is for Alice - NostrizeRelay->>NostrizeNode: Forwards zap request - NostrizeNode-->>Extension: Generates Lightning Invoice + Extension->>NostrizeNode: Sends a zap request to Nostrize
with tag ["p", ""] + NostrizeNode-->>Extension: Generates and sends the Lightning Invoice Extension-->>Bob: Displays Lightning Invoice Bob->>NostrizeNode: Pays the invoice (10000 sats) NostrizeNode->>Alice: Sends 9600 sats to Alice's wallet NostrizeNode-->>NostrizeRelay: Confirms payment, creates zap receipt - NostrizeRelay-->>Extension: Sends boost event receipt + NostrizeRelay-->>Extension: Gets zap receipt from node,
sends it to the extension and creates a boost event Extension-->>Bob: Displays confirmation of boost NostrizeRelay->>NostrizeRelay: Stores boost request and receipt