Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
dansup
dansup
@dansup@mastodon.social  ·  activity timestamp last week

So one tricky aspect I had to solve with Loops is how we use a hashid of the snowflake id for videos, comments and replies in public links, but also deference them to their full ActivityPub permalink.

I built a `matchUrlTemplate` helper that uses regexes to match our url schemas in a way that supports `/v/abcdefg1-` and `/ap/users/1/video/1234567890` links.

It works great, and I will be bringing this to Pixelfed to improve federation support ✨

https://github.com/joinloops/loops-server/blob/main/app/Federation/Handlers/LikeHandler.php#L150-L175

#LoopsDev #ActivityPub

GitHub

loops-server/app/Federation/Handlers/LikeHandler.php at main · joinloops/loops-server

The federated short video sharing platform. Contribute to joinloops/loops-server development by creating an account on GitHub.
  • Copy link
  • Flag this post
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.2-alpha.5 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct