# 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 34
# self = https://watcher.sour.is/conv/mziu3ca
@eldersnake Looks like the internal mapping of nick -> url for the .Followers of the User model is flip-flopping. That data structure needs to change, which is part of the refactor work I have for the Follow/Following subsections of the code. But hmmm I _might_ have to just disable this section of code for now? πŸ€”
@eldersnake Looks like the internal mapping of nick -> url for the .Followers of the User model is flip-flopping. That data structure needs to change, which is part of the refactor work I have for the Follow/Following subsections of the code. But hmmm I _might_ have to just disable this section of code for now? πŸ€”
@prologic Okie dokie. Was worried I had sent it for a spin by using the same username (_again_), but then I can't be the only one that's done that before.
@eldersnake No you're not the only one; but this code will have to change now, as the model can't cope with this πŸ˜‚ For the time being I'm just going to mute the @twtxt bot on my own pod until I fix the code, it's getting late 😴
@eldersnake No you're not the only one; but this code will have to change now, as the model can't cope with this πŸ˜‚ For the time being I'm just going to mute the @twtxt bot on my own pod until I fix the code, it's getting late 😴
@eldersnake In the meantime I figured out a quick/hacky way to fix this(_for the time being_):


    "Followers": {
      "test": "https://7a987bae6af1.ngrok.io/twtxt.txt",
      "test_1": "https://7a987bae6af2.ngrok.io/twtxt.txt",
      "test_3": "https://7a987bae6af3.ngrok.io/twtxt.txt"
    },


Basically the code tries to find a unique key for the "nick" to insert into the ".Following" map. Up to 99 before it gives up. It's a hack but it'll work and I just tested this on a test pod. What do ya think? Shall I roll this out?
@eldersnake In the meantime I figured out a quick/hacky way to fix this(_for the time being_):\n\n
\n    "Followers": {\n      "test": "https://7a987bae6af1.ngrok.io/twtxt.txt",\n      "test_1": "https://7a987bae6af2.ngrok.io/twtxt.txt",\n      "test_3": "https://7a987bae6af3.ngrok.io/twtxt.txt"\n    },\n
\n\nBasically the code tries to find a unique key for the "nick" to insert into the ".Following" map. Up to 99 before it gives up. It's a hack but it'll work and I just tested this on a test pod. What do ya think? Shall I roll this out?
@eldersnake In the meantime I figured out a quick/hacky way to fix this(_for the time being_):


    "Followers": {
      "test": "https://7a987bae6af1.ngrok.io/twtxt.txt",
      "test_1": "https://7a987bae6af2.ngrok.io/twtxt.txt",
      "test_3": "https://7a987bae6af3.ngrok.io/twtxt.txt"
    },


Basically the code tries to find a unique key for the "nick" to insert into the ".Following" map. Up to 99 before it gives up. It's a hack but it'll work and I just tested this on a test pod. What do ya think? Shall I roll this out?
@eldersnake It _however_ does have the unfortunate side-effect of this:



As one would expect.
@eldersnake It _however_ does have the unfortunate side-effect of this:\n\n \n\nAs one would expect.
@eldersnake It _however_ does have the unfortunate side-effect of this:



As one would expect.
@eldersnake PR for this change => https://git.mills.io/yarnsocial/yarn/pulls/450=
@eldersnake PR for this change => https://git.mills.io/yarnsocial/yarn/pulls/450=
@prologic I mean if it works... \n\nAlthough its interesting in my case it's with two different domains πŸ€” that never happened with the twtxt.net _eldersnake_ and my personal pod. Just woke up so hopefully I make sense 😁
@eldersnake I can’t explain that 😁 But if you’re happy enough with this change I’ll merge it now and push it to my pod πŸ‘Œ See if it mitigates then issue πŸ˜‚
@eldersnake I can’t explain that 😁 But if you’re happy enough with this change I’ll merge it now and push it to my pod πŸ‘Œ See if it mitigates then issue πŸ˜‚
@prologic awesome, well it can't hurt for now. Besides the twtxt bot is spamming both our pods 🀣
@eldersnake Rolling it out to my pod before merging…
@eldersnake Rolling it out to my pod before merging…


Now let's give the network ~5-10mins and see what happens πŸ˜‚~
\n\nNow let's give the network ~5-10mins and see what happens πŸ˜‚~


Now let's give the network ~5-10mins and see what happens πŸ˜‚~
Yup! πŸ˜… It's worked already πŸ₯³

Before:




After:


Yup! πŸ˜… It's worked already πŸ₯³

Before:




After:


Yup! πŸ˜… It's worked already πŸ₯³\n\n**Before:\n\n \n \n\nAfter:\n\n \n
I think that did it πŸ€” I see no more spam πŸ€—
I think that did it πŸ€” I see no more spam πŸ€—
@prologic Awesome! Good work. I'll pull down the updates when its merged. And yes if it wasn't already obvious, I have the intended-to-be-public Pod already spun up, just have to put some extra stylistic touches etc on it 😁
@prologic And yup, no more spam on mine either!
@eldersnake Already merged! πŸ‘Œ And yes I saw! πŸ₯³ (_obviously_) πŸ˜‚ Let me know when you want it listed on Yarn.social. Also as a conclusion to this conversation; the actual fix for this is to change the data structure for User.Followers to be a list of Follower objects instead of a map of nick -> url. The Follower object envisioning will have the following structure:

- The URL of the follower
- The Nick of the follower
- The Age of the follower

cc @lyse
@eldersnake Already merged! πŸ‘Œ And yes I saw! πŸ₯³ (_obviously_) πŸ˜‚ Let me know when you want it listed on Yarn.social. Also as a conclusion to this conversation; the actual fix for this is to change the data structure for User.Followers to be a list of Follower objects instead of a map of nick -> url. The Follower object envisioning will have the following structure:

- The URL of the follower
- The Nick of the follower
- The Age of the follower

cc @lyse
@eldersnake Already merged! πŸ‘Œ And yes I saw! πŸ₯³ (_obviously_) πŸ˜‚ Let me know when you want it listed on Yarn.social. Also as a conclusion to this conversation; the actual fix for this is to change the data structure for User.Followers to be a list of Follower objects instead of a map of nick -> url. The Follower object envisioning will have the following structure:\n\n- The URL of the follower\n- The Nick of the follower\n- The Age of the follower\n\ncc @lyse
@eldersnake Noice! πŸ‘Œ
@eldersnake Noice! πŸ‘Œ