diff --git a/README.md b/README.md index 55d6bda..9a2a61b 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,8 @@ This library is Rust version of [megalodon](https://github.com/h3poteto/megalodo - [x] Gotosocial - [x] Akkoma (Unofficial) - [x] Sharkey (Unofficial) +- [x] Hometown (Unofficial) +- [x] Iceshrimp (Unofficial) ## Features - [x] REST API diff --git a/src/detector.rs b/src/detector.rs index 62c6352..ceedd3c 100644 --- a/src/detector.rs +++ b/src/detector.rs @@ -82,13 +82,14 @@ pub async fn detector(url: &str) -> Result { .json::() .await?; match nodeinfo.software.name.as_str() { - "pleroma" => Ok(SNS::Pleroma), "akkoma" => Ok(SNS::Pleroma), - "mastodon" => Ok(SNS::Mastodon), - "friendica" => Ok(SNS::Friendica), - "hometown" => Ok(SNS::Mastodon), "firefish" => Ok(SNS::Firefish), + "friendica" => Ok(SNS::Friendica), "gotosocial" => Ok(SNS::Gotosocial), + "hometown" => Ok(SNS::Mastodon), + "iceshrimp" => Ok(SNS::Firefish), + "mastodon" => Ok(SNS::Mastodon), + "pleroma" => Ok(SNS::Pleroma), "sharkey" => Ok(SNS::Mastodon), _ => { if let Some(upstream) = nodeinfo.metadata.upstream { @@ -114,13 +115,14 @@ pub async fn detector(url: &str) -> Result { .json::() .await?; match nodeinfo.software.name.as_str() { - "pleroma" => Ok(SNS::Pleroma), "akkoma" => Ok(SNS::Pleroma), - "mastodon" => Ok(SNS::Mastodon), - "friendica" => Ok(SNS::Friendica), - "hometown" => Ok(SNS::Mastodon), "firefish" => Ok(SNS::Firefish), + "friendica" => Ok(SNS::Friendica), "gotosocial" => Ok(SNS::Gotosocial), + "hometown" => Ok(SNS::Mastodon), + "iceshrimp" => Ok(SNS::Firefish), + "mastodon" => Ok(SNS::Mastodon), + "pleroma" => Ok(SNS::Pleroma), "sharkey" => Ok(SNS::Mastodon), _ => { if let Some(upstream) = nodeinfo.metadata.upstream { @@ -146,13 +148,14 @@ pub async fn detector(url: &str) -> Result { .json::() .await?; match nodeinfo.software.name.as_str() { - "pleroma" => Ok(SNS::Pleroma), "akkoma" => Ok(SNS::Pleroma), - "mastodon" => Ok(SNS::Mastodon), - "friendica" => Ok(SNS::Friendica), - "hometown" => Ok(SNS::Mastodon), "firefish" => Ok(SNS::Firefish), + "friendica" => Ok(SNS::Friendica), "gotosocial" => Ok(SNS::Gotosocial), + "hometown" => Ok(SNS::Mastodon), + "iceshrimp" => Ok(SNS::Firefish), + "mastodon" => Ok(SNS::Mastodon), + "pleroma" => Ok(SNS::Pleroma), "sharkey" => Ok(SNS::Mastodon), _ => { if let Some(upstream) = nodeinfo.metadata.upstream {