diff options
Diffstat (limited to 'front/src/logic/requests')
-rw-r--r-- | front/src/logic/requests/nostrill.ts (renamed from front/src/logic/requests/nostril.ts) | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/front/src/logic/requests/nostril.ts b/front/src/logic/requests/nostrill.ts index 6f0edcf..6334c34 100644 --- a/front/src/logic/requests/nostril.ts +++ b/front/src/logic/requests/nostrill.ts @@ -1,8 +1,8 @@ import type Urbit from "urbit-api"; -import type { Cursor, PostID, SentPoast } from "@/types/trill"; +import type { Cursor, PostID } from "@/types/trill"; import type { Ship } from "@/types/urbit"; import { FeedPostCount } from "../constants"; -import type { UserProfile } from "@/types/nostril"; +import type { UserProfile } from "@/types/nostrill"; // Subscribe type Handler = (date: any) => void; @@ -12,24 +12,24 @@ export default class IO { this.airlock = airlock; } private async poke(json: any) { - return this.airlock.poke({ app: "nostril", mark: "json", json }); + return this.airlock.poke({ app: "nostrill", mark: "json", json }); } private async scry(path: string) { - return this.airlock.scry({ app: "nostril", path }); + return this.airlock.scry({ app: "nostrill", path }); } private async sub(path: string, handler: Handler) { const err = (err: any, _id: string) => - console.log(err, "error on nostril subscription"); + console.log(err, "error on nostrill subscription"); const quit = (data: any) => - console.log(data, "nostril subscription kicked"); + console.log(data, "nostrill subscription kicked"); const res = await this.airlock.subscribe({ - app: "nostril", + app: "nostrill", path, event: handler, err, quit, }); - console.log(res, "subscribed to nostril agent"); + console.log(res, "subscribed to nostrill agent"); } async unsub(sub: number) { return await this.airlock.unsubscribe(sub); @@ -65,8 +65,8 @@ export default class IO { async pokeAlive() { return await this.poke({ alive: true }); } - async addPost(pubkey: string, content: string) { - const json = { add: { pubkey, content } }; + async addPost(content: string) { + const json = { add: { content } }; return this.poke({ post: json }); } // async addPost(post: SentPoast, gossip: boolean) { |