Enable offline posting

You can now post, like, repost, reply offline

Changelog-Added: Enable offline posting
This commit is contained in:
William Casarin
2023-03-31 15:14:55 -07:00
parent 915f3901a7
commit 2596542cb6
25 changed files with 196 additions and 31 deletions

View File

@@ -140,7 +140,7 @@ func follow_user(pool: RelayPool, our_contacts: NostrEvent?, pubkey: String, pri
return ev
}
func unfollow_user(pool: RelayPool, our_contacts: NostrEvent?, pubkey: String, privkey: String, unfollow: String) -> NostrEvent? {
func unfollow_user(postbox: PostBox, our_contacts: NostrEvent?, pubkey: String, privkey: String, unfollow: String) -> NostrEvent? {
guard let cs = our_contacts else {
return nil
}
@@ -149,7 +149,7 @@ func unfollow_user(pool: RelayPool, our_contacts: NostrEvent?, pubkey: String, p
ev.calculate_id()
ev.sign(privkey: privkey)
pool.send(.event(ev))
postbox.send(ev)
return ev
}