Skip to content

Commit

Permalink
Added sequence diagram for github booster to the README (#19)
Browse files Browse the repository at this point in the history
* Added sequence diagram for github booster to the README
* fix twitter regex for account name
  • Loading branch information
dhalsim authored Aug 27, 2024
1 parent 5fc0daa commit 492da38
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,41 @@ 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->>NostrizeNode: Sends a zap request to Nostrize<br />with tag ["p", "<pubkey_of_alice>"]
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: Gets zap receipt from node,<br />sends it to the extension and creates a boost event
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!
Expand Down
4 changes: 3 additions & 1 deletion src/twitter/profile/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 492da38

Please sign in to comment.