fix
This commit is contained in:
parent
d3ef21a67d
commit
2ddc74ed50
@ -1 +1 @@
|
|||||||
Subproject commit 3dc38ce5fae8cf217864545a3b09c71ce5b066de
|
Subproject commit ef447c49dc905a85c56d44f8b955fd8a780ee7b7
|
@ -273,6 +273,8 @@ pub fn c_bot(c: &Context) {
|
|||||||
.arg(&uri)
|
.arg(&uri)
|
||||||
.arg(&prompt)
|
.arg(&prompt)
|
||||||
.arg(&prompt_sub)
|
.arg(&prompt_sub)
|
||||||
|
.arg(&cid_root)
|
||||||
|
.arg(&uri_root)
|
||||||
.output()
|
.output()
|
||||||
.expect("zsh");
|
.expect("zsh");
|
||||||
let d = String::from_utf8_lossy(&output.stdout);
|
let d = String::from_utf8_lossy(&output.stdout);
|
||||||
|
10
src/main.rs
10
src/main.rs
@ -140,6 +140,12 @@ fn main() {
|
|||||||
Flag::new("cid", FlagType::String)
|
Flag::new("cid", FlagType::String)
|
||||||
.alias("c"),
|
.alias("c"),
|
||||||
)
|
)
|
||||||
|
.flag(
|
||||||
|
Flag::new("uri-root", FlagType::String)
|
||||||
|
)
|
||||||
|
.flag(
|
||||||
|
Flag::new("cid-root", FlagType::String)
|
||||||
|
)
|
||||||
.flag(
|
.flag(
|
||||||
Flag::new("link", FlagType::String)
|
Flag::new("link", FlagType::String)
|
||||||
.alias("l"),
|
.alias("l"),
|
||||||
@ -569,11 +575,13 @@ fn reply_og(c: &Context) {
|
|||||||
let link = c.string_flag("link").unwrap();
|
let link = c.string_flag("link").unwrap();
|
||||||
let cid = c.string_flag("cid").unwrap();
|
let cid = c.string_flag("cid").unwrap();
|
||||||
let uri = c.string_flag("uri").unwrap();
|
let uri = c.string_flag("uri").unwrap();
|
||||||
|
let cid_root = c.string_flag("cid-root").unwrap();
|
||||||
|
let uri_root = c.string_flag("uri-root").unwrap();
|
||||||
let title = c.string_flag("title").unwrap();
|
let title = c.string_flag("title").unwrap();
|
||||||
let desc = c.string_flag("description").unwrap();
|
let desc = c.string_flag("description").unwrap();
|
||||||
let img = c.string_flag("img").unwrap();
|
let img = c.string_flag("img").unwrap();
|
||||||
let h = async {
|
let h = async {
|
||||||
let str = reply_og::post_request(m, link, cid, uri, img, title, desc);
|
let str = reply_og::post_request(m, link, cid, uri, cid_root, uri_root, img, title, desc);
|
||||||
println!("{}", str.await);
|
println!("{}", str.await);
|
||||||
};
|
};
|
||||||
let res = tokio::runtime::Runtime::new().unwrap().block_on(h);
|
let res = tokio::runtime::Runtime::new().unwrap().block_on(h);
|
||||||
|
@ -10,6 +10,8 @@ pub async fn post_request(
|
|||||||
link: String,
|
link: String,
|
||||||
cid: String,
|
cid: String,
|
||||||
uri: String,
|
uri: String,
|
||||||
|
cid_root: String,
|
||||||
|
uri_root: String,
|
||||||
img: String,
|
img: String,
|
||||||
title: String,
|
title: String,
|
||||||
description: String,
|
description: String,
|
||||||
@ -49,8 +51,8 @@ pub async fn post_request(
|
|||||||
},
|
},
|
||||||
"reply": {
|
"reply": {
|
||||||
"root": {
|
"root": {
|
||||||
"cid": cid.to_string(),
|
"cid": cid_root.to_string(),
|
||||||
"uri": uri.to_string()
|
"uri": uri_root.to_string()
|
||||||
},
|
},
|
||||||
"parent": {
|
"parent": {
|
||||||
"cid": cid.to_string(),
|
"cid": cid.to_string(),
|
||||||
|
Loading…
Reference in New Issue
Block a user