# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 32
# self = https://watcher.sour.is/conv/gyxy4ta
Just testing something here with Goryon πŸ˜… @Google
Just testing something here with Goryon πŸ˜… @Google
Seems to work πŸ˜† Very hacky code though cc @aman
Seems to work πŸ˜† Very hacky code though cc @aman
What about this form... Let's confuse things even more? πŸ˜‚ @Google πŸ€”
What about this form... Let's confuse things even more? πŸ˜‚ @Google πŸ€”
@lyse I'm not entirely sure how to handle this... πŸ€” If someone is umm dumb enough (_okay harsh, but..._) to use the @<nick url> Twtxt mention form to mention something or someone that IS NOT a Twtxt feed; What do we do?! 😳 Turns out yarnd will currently happily accept this and even try to process it as an external profile and even try to fetch twtst from it! 😱
@lyse I'm not entirely sure how to handle this... πŸ€” If someone is umm dumb enough (_okay harsh, but..._) to use the @<nick url> Twtxt mention form to mention something or someone that IS NOT a Twtxt feed; What do we do?! 😳 Turns out yarnd will currently happily accept this and even try to process it as an external profile and even try to fetch twtst from it! 😱
@quark / @fastidious Any thoughts on this edge case? πŸ€”
@quark / @fastidious Any thoughts on this edge case? πŸ€”
@prologic
Kind of a pickle. I would say, if the user isn't following the feed, then @something and @something@example.com doesn't get linked.
@prologic \nKind of a pickle. I would say, if the user isn't following the feed, then @something and @something@example.com doesn't get linked.
@quark Are you suggesting to _solve_ this to not link them at all if the user isn't actually following them in the first place? πŸ€” Or should we try to validate the @-mention at post time and do a validation of the feed? (_could eat up time on the "Post" call, but πŸ€·β€β™‚οΈ_)_
@quark Are you suggesting to _solve_ this to not link them at all if the user isn't actually following them in the first place? πŸ€” Or should we try to validate the @-mention at post time and do a validation of the feed? (_could eat up time on the "Post" call, but πŸ€·β€β™‚οΈ_)_
@prologic \nValidating the mention will be consuming, no? I mean, right now it takes a bit when clicking on the nick of an external user. Also, discovery occurs mostly by mentioning, yes? It seems a hard problem to solve.
@prologic
Validating the mention will be consuming, no? I mean, right now it takes a bit when clicking on the nick of an external user. Also, discovery occurs mostly by mentioning, yes? It seems a hard problem to solve.
@quark Hmmm πŸ€”
@quark Hmmm πŸ€”
@prologic @quark So tt just renders this mention as an unfollowed feed as I expect. I can then open the URLs view manually and follow the "feed". But that would be a manual step, tt doesn't fetch anything automatically. I don't think you can't really do something about it. Maybe the URL was valid at the time or will become valid in the future. Valid as in a valid twtxt feed.
@prologic So does yarnd try to fetch this "feed" now periodically or just at the very first time or when somebody tries to view the profile?
@lyse Yeah I feel there isn’t a lot you can do here honestly and yarnd behaves similarly
@lyse Yeah I feel there isn’t a lot you can do here honestly and yarnd behaves similarly
@lyse Only when someone tries to view it.
@lyse Only when someone tries to view it.
@prologic Do you have any numbers on how often that happens? Maybe viewing a profile should not immediately fetch the feed but only if the feed hadn't been fetched in say the last five minutes or so. Otherwise it just displays its empty cache. Or will this empty result set trigger the fetch?
@lyse Good question … Jist having a beer right now 🀣 Lemme go check the code path for that section πŸ€”
@lyse Good question … Jist having a beer right now 🀣 Lemme go check the code path for that section πŸ€”
It only makes a feed cache fetch if it isn't already in the cache. So basically only once, never again unless someone on the pod _actually_ follows that feed and it's part of the normal feed cache cycle.
It only makes a feed cache fetch if it isn't already in the cache. So basically only once, never again unless someone on the pod _actually_ follows that feed and it's part of the normal feed cache cycle.
@prologic So that's not too bad. But skimming over Cache.FetchTwts(…) reveals that the cache isn't touched when the parsing of the feed fails. Assuming that an invalid feed produces an error (might be wrong, didn't investiage any further), the cache is not populated, triggering a fetch each time somebody visits the profile.
@lyse Hmmm you might be right there. I’ll double check and do some testing πŸ‘Œ The problem is that even non-feeds often don’t produce errors as such so it’s quite hard to tell for sure whether a feed is actually valid or not πŸ€”
@lyse Hmmm you might be right there. I’ll double check and do some testing πŸ‘Œ The problem is that even non-feeds often don’t produce errors as such so it’s quite hard to tell for sure whether a feed is actually valid or not πŸ€”