Skip to content

Commit

Permalink
Support Iceshrimp
Browse files Browse the repository at this point in the history
  • Loading branch information
h3poteto committed Nov 19, 2024
1 parent 4c20333 commit 91399b2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 15 additions & 12 deletions src/detector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,14 @@ pub async fn detector(url: &str) -> Result<SNS, error::Error> {
.json::<Nodeinfo10>()
.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 {
Expand All @@ -114,13 +115,14 @@ pub async fn detector(url: &str) -> Result<SNS, error::Error> {
.json::<Nodeinfo20>()
.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 {
Expand All @@ -146,13 +148,14 @@ pub async fn detector(url: &str) -> Result<SNS, error::Error> {
.json::<Nodeinfo21>()
.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 {
Expand Down

0 comments on commit 91399b2

Please sign in to comment.