mirror of https://github.com/LemmyNet/lemmy.git
update
parent
f86a99b336
commit
53079c113a
File diff suppressed because it is too large
Load Diff
|
@ -44,4 +44,4 @@ anyhow = "1.0.43"
|
|||
thiserror = "1.0.26"
|
||||
background-jobs = "0.9.0"
|
||||
reqwest = { version = "0.11.4", features = ["json"] }
|
||||
webmention = {version = "0.1.3", features = ["hyper"], default-features = false }
|
||||
webmention = {version = "0.3.0", git = "https://github.com/marinintim/webmention.git", branch = "feature/response" }
|
||||
|
|
|
@ -28,6 +28,7 @@ use lemmy_utils::{
|
|||
LemmyError,
|
||||
};
|
||||
use lemmy_websocket::{send::send_post_ws_message, LemmyContext, UserOperationCrud};
|
||||
use log::warn;
|
||||
use url::Url;
|
||||
use webmention::Webmention;
|
||||
|
||||
|
@ -141,8 +142,11 @@ impl PerformCrud for CreatePost {
|
|||
|
||||
if let Some(url) = updated_post_url {
|
||||
let hostname = Url::parse(&Settings::get().get_protocol_and_hostname())?;
|
||||
let mut webmention: Webmention = (hostname, url.clone().into_inner()).into();
|
||||
webmention.send().await?;
|
||||
let mut webmention: Webmention = (hostname, url.into_inner()).into();
|
||||
webmention.set_checked(true);
|
||||
if let Err(e) = webmention.send().await {
|
||||
warn!("Failed to send webmention: {}", e);
|
||||
}
|
||||
}
|
||||
|
||||
send_post_ws_message(
|
||||
|
|
Loading…
Reference in New Issue