Event & profile links #653

Merged
mmalmi merged 5 commits from mmalmi/snort:main into main 2023-10-18 07:06:49 +00:00
Collaborator
  • CONFIG.eventLinkPrefix used for event links
  • remove /e/ and /p/ from note and profile links
* CONFIG.eventLinkPrefix used for event links * remove /e/ and /p/ from note and profile links
mmalmi added 2 commits 2023-10-17 18:44:35 +00:00
CONFIG.eventLinkPrefix
All checks were successful
continuous-integration/drone/pr Build is passing
d9bd198e8d
mmalmi added 1 commit 2023-10-17 18:50:21 +00:00
CONFIG.profileLinkSuffix
All checks were successful
continuous-integration/drone/pr Build is passing
2c7878ac7f
mmalmi changed title from Event links to Event & profile links 2023-10-17 18:58:41 +00:00
mmalmi added 1 commit 2023-10-17 19:02:55 +00:00
"share note" url
All checks were successful
continuous-integration/drone/pr Build is passing
700db8f62c
Kieran approved these changes 2023-10-17 19:45:48 +00:00
@ -111,0 +113,4 @@
/**
* Convert hex pubkey to bech32 link url
*/
export function profileLink(hex: HexKey, relays?: Array<string> | string) {
Owner

This should be removed

This should be removed
mmalmi marked this conversation as resolved
@ -164,3 +164,3 @@
}
static fromEvent(ev: TaggedNostrEvent | NostrEvent) {
static fromEvent(ev: TaggedNostrEvent | NostrEvent, prefixHint = NostrPrefix.Event) {
Owner

This seems like the wrong approach, if you want to adjust the prefix it would probably be simpler to do it at encode()

This seems like the wrong approach, if you want to adjust the prefix it would probably be simpler to do it at `encode()`
Owner

There are a lot of places where i use fromEvent but not encode since NostrLink is passed around a lot, i dont care what the prefix is in those cases (nevent/note are both accepted)

There are a lot of places where i use `fromEvent` but not `encode` since `NostrLink` is passed around a lot, i dont care what the prefix is in those cases (`nevent`/`note` are both accepted)
Author
Collaborator

good point!

good point!
mmalmi marked this conversation as resolved
mmalmi added 1 commit 2023-10-18 07:05:51 +00:00
NostrLink.encode(prefix: NostrPrefix)
All checks were successful
continuous-integration/drone/pr Build is passing
2e663dcb4c
mmalmi merged commit 81df18ea4e into main 2023-10-18 07:06:47 +00:00
Sign in to join this conversation.
No description provided.