Tuba icon indicating copy to clipboard operation
Tuba copied to clipboard

Misskey API support

Open ThatOneCalculator opened this issue 2 years ago • 20 comments
trafficstars

Having this act as more of a cross-fediverse client rather than specifically a Mastodon client would help differentiate it :)

ThatOneCalculator avatar Dec 13 '22 05:12 ThatOneCalculator

I really like Misskey/Calckey so I'm definitely interested in supporting them!

I gave it some tries since this issue opened but it's semi-blocked by #12 and #14. In the meantime if/when Calckey gets Mastodon API compat, similar to Pleroma or Akkoma, it should be supported by Tooth!

GeopJr avatar Jan 03 '23 03:01 GeopJr

Would (custom) emoji reactions be supported? This also affects Pleroma and Akkoma, and it requires a layout change.

McSinyx avatar Jan 03 '23 09:01 McSinyx

@GeopJr I don't think they'll ever get Masto API support to be honest, it'd moreso be you implementing the Mk API

ThatOneCalculator avatar Jan 03 '23 12:01 ThatOneCalculator

Would (custom) emoji reactions be supported? This also affects Pleroma and Akkoma, and it requires a layout change.

Opened another issue for it #44

@GeopJr I don't think they'll ever get Masto API support to be honest, it'd moreso be you implementing the Mk API

I mostly went by this comment: https://codeberg.org/calckey/calckey/issues/9256#issuecomment-731083 but since the issue is now closed I take it as not planned. (Either way, when I said "in the meantime" I meant until those 2 issues get fixed and full mk/ck API support gets added!)

GeopJr avatar Jan 03 '23 14:01 GeopJr

@GeopJr we now support the Mastodon API! You can test it out on https://calckey.social

It works sort of, but there's an issue of no images loading, which appears to be unique to Tootle and Tuba.

image

ThatOneCalculator avatar Mar 23 '23 23:03 ThatOneCalculator

I'm having trouble reproducing, could you send me your debugging information? (About > Troubleshooting > Debugging Information)

Also, could you give running from a terminal a try? There will be a lot of logs so keep an eye around Network.vala:50: GET: https://calckey.social/files/36d58ab7-6931-47f3-a5a5-e21889fe1ce7 for media urls

image

GeopJr avatar Mar 24 '23 11:03 GeopJr

On further debugging it, I found the following issues:

  • When selecting a profile it 401s (/api/v1/accounts/$id/statuses) Request "https://calckey.social/api/v1/accounts/9arjouq4ja/statuses?pinned=true" failed: 401 Unauthorized
  • Account header was null, probably related to the above

Selecting my own profile however, seems to use the Mastodon id instead https://calckey.social/api/v1/accounts/057099112122053114116103113105/statuses?only_media=false&exclude_replies=true&limit=20 and a http.cat header is available

GeopJr avatar Mar 24 '23 11:03 GeopJr

Interesting, I'll investigate that.

Can you also make an account on https://stop.voring.me? calckey.social stores its files on disk, but stop.voring.me uses a CDN, and I get this error:

(dev.geopjr.Tuba:16293): Tuba-WARNING **: 12:01:58.253: ImageCache.vala:44: Failed to download image at "https://pool.jortage.com/voringme/misskey/thumbnail-0b704e35-8d0d-4976-9c32-c4e3d8457007.webp". Unrecognized image file format.

Debug info:

os: EndeavourOS (null)
prefix: /usr
flatpak: false
version: 0.1.0 (production)
gtk: 4.10.1 (4.10.1)
libadwaita: 1.3.1 (1.3.1)
libsoup: 2.74.3 (2.74.3)

ThatOneCalculator avatar Mar 24 '23 19:03 ThatOneCalculator

Still can't reproduce, my only speculation is that you are missing webp libraries, I think it's webp-pixbuf-loader, could you give it a try?

GeopJr avatar Mar 24 '23 19:03 GeopJr

Yep, that fixed it. That should probably be added as a dependency for the AUR.

ThatOneCalculator avatar Mar 24 '23 19:03 ThatOneCalculator

cc: @fabiscafe

(probably optional dependency?)

GeopJr avatar Mar 24 '23 19:03 GeopJr

One more bug: unicode emoji reactions show, but custom emoji reactions don't.

image

ThatOneCalculator avatar Mar 24 '23 19:03 ThatOneCalculator

Pleroma and Mastodon forks (that support reactions), provide the url for custom emojis:

{
      "count" : int,
      "me" : bool,
      "name" : string,
      "url" : string?
}

Calckey doesn't seem to do so: https://stop.voring.me/api/v1/statuses/9cn6nnxz8g

{
      "count": 1,
      "me": false,
      "name": ":rage1@.:"
}

GeopJr avatar Mar 24 '23 19:03 GeopJr

Still can't reproduce, my only speculation is that you are missing webp libraries, I think it's webp-pixbuf-loader, could you give it a try?

Update is available :partying_face:

Would you add a meson check for it as runtime dependency to the next version? Usually in situations where it is not a compile time dependency I'd add it as optional dependency, but since this is UX breaking it should be a hard dependency (and is on the PKGBUILD)

fabiscafe avatar Mar 24 '23 20:03 fabiscafe

Thanks!

I feel like you'll be asked to make it optional since technically it works without it, but if you are not until the next release, I'll add a meson check!

GeopJr avatar Mar 24 '23 21:03 GeopJr

Thanks! Let's not tell anyone, so nobody will notice :smirk:

fabiscafe avatar Mar 24 '23 21:03 fabiscafe

@GeopJr So does Misskey work on Tuba yet? If not, any plans in the future?

VarLad avatar Jun 12 '23 23:06 VarLad

As long as this issue is open, it's safe to assume that it's not. Priority for mk api support is low for me at the moment but I'm happy to review any PRs for it!

edit: Calckey's mastodon api compat should work however

GeopJr avatar Jun 13 '23 00:06 GeopJr

The compatibility layer is very barebones, so proper API support in the future would be much appreciated.

ThatOneCalculator avatar Jun 13 '23 02:06 ThatOneCalculator

Started initial support on this branch: https://github.com/GeopJr/Tuba/tree/experiment/wip/feat/mk-api-support

It's very far from being usable, I've only completed the login flow and basic compat for some objects. Priority is still low. The plan is to first get the tuba 100% usable for Misskey (replacing Mastodon support) and then split it into its own thing (edit: as in include it as an addon to tuba - not a separate app) so if anyone is planning on testing/contributing it might mess up your saved accounts (and you might have to remove them manually from Passwords & Keys (seahorse)).

GeopJr avatar Jun 19 '23 15:06 GeopJr