Ω🪬Ω
new release of #Fedialgo, the customizable timeline algorithm / filtering system for your Mastodon feed, counts the number of times each hashtag appears in your timeline even if people don't use a "#" character to give you a better sense of what people are talking about in the Fediverse.

there's a little bit of art vs. science here because some strings are disqualified from this kind of counting (e.g. a word like "the" should not be counted even if some maniac decided to make it a hashtag) so let me know if you see any weirdly high counts.

* Link: https://michelcrypt4d4mus.github.io/fedialgo_demo_app_foryoufeed/
* Code: https://github.com/michelcrypt4d4mus/fedialgo_demo_app_foryoufeed
* Video of FediAlgo in action: https://universeodon.com/@cryptadamist/114395249311910522

#activitypub #algorithm #algorithmicFeed #algorithmicTimeline #Fedi #FediTips #FediTools #Fediverse #Feed #FOSS #Masto #MastoAdmin #Mastodon #mastohelp #MastoJS #nodejs #node #opensource #SocialWeb #timeline #TL #webdev #hashtag #typescript #hashtags

@cryptadamist when trying to authenticate with gotosocial i get this error

@marin hmm, is gotosocial fully interoperable with mastodon? i'm not 100% sure that it should even work...

also can you bring up the developer console and look at the error? (in firefox it's Tools->Browser Tools->Browser Console)

@cryptadamist
(i have redacted some values, but have not touched keys, nor fully removed them)

[DEMO APP] <ErrorHandler> FediAlgo failed to register itself with the server!
(note: oAuth() api.v1.apps.verifyCredentials() failed. Try logging out and in again?), {
"app": {
"id": "01JY9BBPR3Y8SBR7KK67YBWECE",
"createdAt": "2025-06-21T13:38:01.091Z",
"name": "FediAlgoDemo",
"website": "https://fedi.marin.fyi",
"redirectUri": "https://michelcrypt4d4mus.github.io/fedialgo_demo_app_foryoufeed",
"redirectUris": [
"https://michelcrypt4d4mus.github.io/fedialgo_demo_app_foryoufeed"
],
"clientId": "xxxxxxxx",
"clientSecret": "xxxx-xxxx-xxx-xxxx-xxxxxxxx",
"vapidKey": "xxxxxxxx-xxxx-xxxxx-xxxx",
"scopes": [
"read",
"write:bookmarks",
"write:favourites",
"write:follows",
"write:media",
"write:mutes",
"write:statuses"
]
},
"code": "xxxxxxxx",
"searchParams": {},
"user": null
} (error.message="Not Found") FediAlgo failed to register itself with the server!
(note: oAuth() api.v1.apps.verifyCredentials() failed. Try logging out and in again?) _t: Not Found
t custom-error.mjs:48
_t masto-http-error.js:8
createError http-native-impl.js:67
Caused by: Response { }

Object { app: {…}, code: "xxxxxxxxxxx", searchParams: URLSearchParams(1), user: null }
logger.js:69:16
error logger.js:69
logAndSetFormattedError ErrorHandler.tsx:79
s CallbackPage.tsx:53
s CallbackPage.tsx:93

@marin thanks! it seems like it should be supported... i suspect you have run into a bug in the masto.js package; gonna poke around for a bit and will report the issue to the devs.

https://github.com/neet/masto.js/issues/713

@cryptadamist hmm, but the app still _works_, but i tried to favourite a post and it actually worked, i opened the remote instance, looked at the favourites and i was there, but when i clicked the little open icon in fedialgo it led me to https://fedi.marin.fyi/@[email protected]/01JY96BSF84EFFW33GPENJ6X35 , which mastodon doesnt support, but i guess it works good enough even on gts
@marin wait, so you only had an error when you tried to favourite a post or you hit the error when trying to login?
@cryptadamist when logging in, still on the left side of my screen it says this:

Non-fatal errors encountered while loading data:

[TrendingTagToots] <timeline> {getApiObjs} (handleApiError) "_t: Not Found: tag was not found, or not useable/listable on this instance after pulling 0 rows (cache: 0 rows).
[TrendingTagToots] <timeline> {getApiObjs} (handleApiError) "_t: Not Found: tag was not found, or not useable/listable on this instance after pulling 0 rows (cache: 0 rows).
[TrendingTagToots] <timeline> {getApiObjs} (handleApiError) "_t: Not Found: tag was not found, or not useable/listable on this instance after pulling 0 rows (cache: 0 rows).
[TrendingTagToots] <timeline> {getApiObjs} (handleApiError) "_t: Not Found: tag was not found, or not useable/listable on this instance after pulling 0 rows (cache: 0 rows).
[TrendingTagToots] <timeline> {getApiObjs} (handleApiError) "_t: Not Found: tag was not found, or not useable/listable on this instance after pulling 0 rows (cache: 0 rows).
[TrendingTagToots] <timeline> {getApiObjs} (handleApiError) "_t: Not Found: tag was not found, or not useable/listable on this instance after pulling 0 rows (cache: 0 rows).
[TrendingTagToots] <timeline> {getApiObjs} (handleApiError) "_t: Not Found: tag was not found, or not useable/listable on this instance after pulling 0 rows (cache: 0 rows).
[TrendingTagToots] <timeline> {getApiObjs} (handleApiError) "_t: Not Found: tag was not found, or not useable/listable on this instance after pulling 0 rows (cache: 0 rows).
[TrendingTagToots] <timeline> {getApiObjs} (handleApiError) "_t: Not Found: tag was not found, or not useable/listable on this instance after pulling 0 rows (cache: 0 rows).

and just a bunch of those. but when i favourited a post nothing popped up and the icon turned orange-yellow-whatever and the post did actually get favourited

@marin fascinating... OK those errors are discountable, it's just for whatever reason failing to pull the hashtag timeline for what it has identified as "trending" tags. maybe the GTS instance doesn't support the hashtag timeline function? (this function: https://docs.joinmastodon.org/methods/timelines/#tag)

that means you'll be relying on the search() API to find toots with trending tags but that's survivable.

but when did you get the error message you first posted, about the app failing to register itself? at login time or later?

timelines API methods - Mastodon documentation

Read and view timelines of statuses.

@marin i think i managed to fix this issue; was a hangover from the code i forked that was doing some weird stuff. give it a try if you have a chance and let me know if it worked.

[edit] you might need to clear your cache / cookies for the app for the fix to apply

details of the fix here: https://github.com/neet/masto.js/issues/1317#issuecomment-2993852419

Error calling verifyCredentials() and hashtag timelines for a new app with GoToSocial server · Issue #1317 · neet/masto.js

App verifyCredentials() issue Apologies for possibly incomplete information here but I recently had someone report a bug when trying to use fedialgo with a GoToSocial instance and I suspect (but am...

GitHub
@cryptadamist i got ALL of those errors during login, the popup as well, but i just clicked out of it and then it worked as i described before, the errors stay in that left part but it works, ill also see and enable that function and test again

@marin i reported an issue with masto.js team; maybe they can help here (let me know if there's any information i missed in the report)

https://github.com/neet/masto.js/issues/1317

Error calling verifyCredentials() and hashtag timelines for a new app with GoToSocial server · Issue #1317 · neet/masto.js

App verifyCredentials() issue Apologies for possibly incomplete information here but I recently had someone report a bug when trying to use fedialgo with a GoToSocial instance and I suspect (but am...

GitHub

@marin are you running your own GoToSocial instance? if so maybe check how you've configured the registering of applications? This is the relevant section of the mastodon API:

https://docs.joinmastodon.org/methods/apps/

apps API methods - Mastodon documentation

Register client applications that can be used to obtain OAuth tokens.

@marin also what version of gotosocial is your server running?
@cryptadamist latest(GoToSocial 0.19.1+git-6574dc8 )
@marin thanks; added that information to the github issue
@cryptadamist http://marin.fyi/bug-fedialgo.mp4 u can add this as well, a full video of me doing all of it
@cryptadamist also shows the bug where it assumes my instance can handle remote posts, but thats not that big of a deal

@marin cool, looking. is your GTS instance not able to resolve remote posts?

also curious: if you go in Experimental Features -> Show State there's a "homeserver" section... i'd be curious to see what's in there for a GTS instance, maybe there's some info there I can leverage to fix remote post link resolution.

@cryptadamist `Homeserver:{17 items
accountDomain:"marin.fyi"
configuration:{...}8 items
contact:{...}2 items
customCss:".page-header {\n animation: rotate 5s linear infinite;\n}\n\n@keyframes rotate {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}"
description:"<p>private instance, you can't get an account here<br>private instance, you can't get an account here<br>private instance, you can't get an account here<br>private instance, you can't get an account here<br>private instance, you can't get an account here<br>private instance, you can't get an account here</p>"
descriptionText:"private instance, you can't get an account here\r\nprivate instance, you can't get an account here\r\nprivate instance, you can't get an account here\r\nprivate instance, you can't get an account here\r\nprivate instance, you can't get an account here\r\nprivate instance, you can't get an account here"
domain:"marin.fyi"
languages:[]0 items
registrations:{...}3 items
rules:[]0 items
sourceUrl:"https://codeberg.org/superseriousbusiness/gotosocial"
terms:"<p>i collect all your data, i sell it to everyone and there is no sla</p>"
termsText:"i collect all your data, i sell it to everyone and there is no sla"
thumbnail:{...}5 items
title:"marin fedi instance"
usage:{...}1 item
version:"0.19.1+git-6574dc8"
}`

if you want content of some subentry lmk
@marin maybe click around in there and see if there's some kind of flag like "remotePostsEnabled" or something? tbh i have no idea if such a configuration parameter exists or what it might be called, but if we can find it i can handle this situation more elegantly by pointing links at the post's original server
@cryptadamist well you can always detect if its gts with the sourceUrl, and i doubt such thing will exist because im pretty sure gts just DOENST support it, not optional just doenst

@marin so GTS instance sourceURL will always be "https://codeberg.org/superseriousbusiness/gotosocial" (or at least will always end with "gotosocial")?

if GTS never supports remote posts I think that's enough for me to fix the issue.

gotosocial

Fast, fun, small ActivityPub server.

Codeberg.org

@marin hopefully fixed/deployed in version 0.75.8 if you reload (version is in the header) but only for opening Toot links... not sure how it's going to work with submitting a reply because that's still going to try to resolve the URL to the local server because that's what a standard Mastodon instance requires. do you have any idea how to handle that?

specifically I guess the question is "what does one put in the 'inReplyToId' field when submitting a new Status object on a GoToSocial instance?" Mastodon requires that it be a local ID which usually is a number, though from your video it kind of looks like GoToSocial uses alphanumeric IDs?

@marin also do you have any server side information about what happened with the favourite() call? in your video i just see "Internal Server Error" but seeing as how it succeeded it was probably not actually an internal server error and could possibly be some bad handling of the response by masto.js

[edit] and/or can you show me the client side browser logs from the attempt to favourite()? curious if there's any more information in there.

#mastojs

@marin fwiw my hunch here after reassessing the evidence is that GoToSocial is resolving to a local alphanumeric ID that can probably be used to post a reply as it is... if you get a chance to test it out by posting a reply to a toot let me know how it goes.

@marin my hunch was incorrect but i think i figured out the source of the problem:

https://github.com/neet/masto.js/issues/1317#issuecomment-3020334525

Error calling verifyCredentials() and hashtag timelines for a new app with GoToSocial server · Issue #1317 · neet/masto.js

App verifyCredentials() issue Apologies for possibly incomplete information here but I recently had someone report a bug when trying to use fedialgo with a GoToSocial instance and I suspect (but am...

GitHub
@marin should be fixed now (i've been testing it with my own GoToSocial account)
@cryptadamist discrimination against "the" enthusiasts is real.