# 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! π±
				
			  		  
			
		
			
					
				
			  		  
			
		
			
					
				
			  		  
			
		
			
					
				
					@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.
				
			  		  
			
		
			
					
				
			  		  
			
		
			
					
				
			  		  
			
		
			
					
				
					@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 π€