urbit_http_api/apps/invitestore.rs
1use crate::{Channel, Node, Result, UrbitAPIError};
2use crossbeam::channel::{unbounded, Receiver};
3use json::JsonValue;
4use std::thread;
5use std::time::Duration;
6
7/// A struct that provides an interface for interacting with invite-store
8pub struct InviteStore<'a> {
9 pub channel: &'a mut Channel,
10}
11
12impl<'a> InviteStore<'a> {
13 /// Accept an invite
14 pub fn accept_invite(&self, term: &str, uid: &str) {
15 // let mut poke2_data = json::JsonValue::new_object();
16 // poke2_data["accept"] = json::JsonValue::new_object();
17 // poke2_data["accept"]["term"] = "graph".to_string().into();
18 // poke2_data["accept"]["uid"] = poke_channel.uid.clone().into();
19 // let _poke2_response = poke_channel.poke("invite-store", "invite-action", &poke_data);
20 todo!();
21 }
22}