Skip to content

Commit 09f135d

Browse files
committed
authors can read their own paywallet posts.
1 parent a1d84cf commit 09f135d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

global/paywall.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ var canReadCache = xsync.NewMapOf[[16]byte, bool]()
1313

1414
// returns a cached boolean or computes it and returns
1515
func CanReadPaywalled(author, reader nostr.PubKey) bool {
16+
if author == reader {
17+
return true
18+
}
19+
1620
key := [16]byte{}
1721
copy(key[0:8], author[0:8])
1822
copy(key[8:16], reader[0:8])

0 commit comments

Comments
 (0)