Skip to content

Commit

Permalink
Merge pull request #276 from h3poteto/pleroma/deprecated-subscribe
Browse files Browse the repository at this point in the history
pleroma: Deprecated API replace
  • Loading branch information
h3poteto authored Dec 31, 2024
2 parents e2f7c03 + 2f7401b commit 341b8b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pleroma/pleroma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,11 +415,11 @@ impl megalodon::Megalodon for Pleroma {
&self,
id: String,
) -> Result<Response<MegalodonEntities::Relationship>, Error> {
let params = HashMap::<&str, Value>::new();
let params = HashMap::<&str, Value>::from([("notify", serde_json::Value::Bool(true))]);
let res = self
.client
.post::<entities::Relationship>(
format!("/api/v1/pleroma/accounts/{}/subscribe", id).as_str(),
format!("/api/v1/accounts/{}/follow", id).as_str(),
&params,
None,
)
Expand All @@ -437,11 +437,11 @@ impl megalodon::Megalodon for Pleroma {
&self,
id: String,
) -> Result<Response<MegalodonEntities::Relationship>, Error> {
let params = HashMap::<&str, Value>::new();
let params = HashMap::<&str, Value>::from([("notify", serde_json::Value::Bool(false))]);
let res = self
.client
.post::<entities::Relationship>(
format!("/api/v1/pleroma/accounts/{}/unsubscribe", id).as_str(),
format!("/api/v1/accounts/{}/follow", id).as_str(),
&params,
None,
)
Expand Down

0 comments on commit 341b8b2

Please sign in to comment.