mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-08-06 01:22:30 +02:00
move ExternalPointer to nip73 and write nip27.Parse() that gets all the parts of the text including URLs, Nostr URIs and just raw text.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package nip22
|
||||
|
||||
import "github.com/nbd-wtf/go-nostr"
|
||||
import (
|
||||
"github.com/nbd-wtf/go-nostr"
|
||||
"github.com/nbd-wtf/go-nostr/nip73"
|
||||
)
|
||||
|
||||
func GetThreadRoot(tags nostr.Tags) nostr.Pointer {
|
||||
for _, tag := range tags {
|
||||
@@ -15,7 +18,7 @@ func GetThreadRoot(tags nostr.Tags) nostr.Pointer {
|
||||
ep, _ := nostr.EntityPointerFromTag(tag)
|
||||
return ep
|
||||
case "I":
|
||||
ep, _ := nostr.ExternalPointerFromTag(tag)
|
||||
ep, _ := nip73.ExternalPointerFromTag(tag)
|
||||
return ep
|
||||
}
|
||||
}
|
||||
@@ -35,7 +38,7 @@ func GetImmediateParent(tags nostr.Tags) nostr.Pointer {
|
||||
ep, _ := nostr.EntityPointerFromTag(tag)
|
||||
return ep
|
||||
case "i":
|
||||
ep, _ := nostr.ExternalPointerFromTag(tag)
|
||||
ep, _ := nip73.ExternalPointerFromTag(tag)
|
||||
return ep
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user