# 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 46
# self = https://watcher.sour.is/conv/5535xyq
@prologic, I think it's about time I try out Salty. I followed from the instructions on the website, and it didn't go too well. I suspect it's because the local path from my JSON file (/01G268YYHWGNYT9M1M9760KP83) on mckinley.cc doesn't return anything because I don't have a broker set up there.

I seem to have registered mckinley@mills.io when experimenting with it, but I didn't know until recently because of a very confusing output. That account does exist, though, because it shows up when using salty-chat lookup.

TL;DR: I want to try Salty. I'm very confused. Would you mind if I use your broker for now? Is there a way to do that and still be mckinley@mckinley.cc? If not, could you delete mckinley@mills.io so I can register it again? That private key is long gone.
@mckinley I will answer your questions out-of-order if you don't mind πŸ˜†

> Is there a way to do that and still be mckinley@mckinley.cc?

Yes. By setting up an SRV record for your domain that points to my broker.

Partial instructions here in DNS Setup
@mckinley I will answer your questions out-of-order if you don't mind πŸ˜†

> Is there a way to do that and still be mckinley@mckinley.cc?

Yes. By setting up an SRV record for your domain that points to my broker.

Partial instructions here in DNS Setup
@mckinley

> think it’s about time I try out Salty. I followed from the instructions on the website, and it didn’t go too well. I suspect it’s because the local path from my JSON file (/01G268YYHWGNYT9M1M9760KP83) on mckinley.cc doesn’t return anything because I don’t have a broker set up there.

Judging from the output you so kindly provided, this looks like several bugs to me. I might have to spend some time and fix these. I assume you created the Well-Known JSON config file on your web server at the top-level of your domain?

The Endpoint is also wrong, it should be an absolute URI. so that's failed too (bug) 😒

Finally in order for you to properly be 100% self-hosted here on your own domain, you'd need to either run msgbus somewhere so you can point your Salty Addr's endpoint at that, or spin up an instance of saltyd which takes care of basically everything automatically.
@mckinley

> think it’s about time I try out Salty. I followed from the instructions on the website, and it didn’t go too well. I suspect it’s because the local path from my JSON file (/01G268YYHWGNYT9M1M9760KP83) on mckinley.cc doesn’t return anything because I don’t have a broker set up there.

Judging from the output you so kindly provided, this looks like several bugs to me. I might have to spend some time and fix these. I assume you created the Well-Known JSON config file on your web server at the top-level of your domain?

The Endpoint is also wrong, it should be an absolute URI. so that's failed too (bug) 😒

Finally in order for you to properly be 100% self-hosted here on your own domain, you'd need to either run msgbus somewhere so you can point your Salty Addr's endpoint at that, or spin up an instance of saltyd which takes care of basically everything automatically.
@mckinley

> I seem to have registered mckinley@mills.io when experimenting with it, but I didn’t know until recently because of a very confusing output. That account does exist, though, because it shows up when using salty-chat lookup.

You are right, the superfluous warning there is very confusing:

> WARN[0001] error looking up user endpoint error="error looking up user mckinley@mills.io: non-2xx response received: 404 Not Found"

I will remove this. It's silly πŸ˜‚=
@mckinley

> I seem to have registered mckinley@mills.io when experimenting with it, but I didn’t know until recently because of a very confusing output. That account does exist, though, because it shows up when using salty-chat lookup.

You are right, the superfluous warning there is very confusing:

> WARN[0001] error looking up user endpoint error="error looking up user mckinley@mills.io: non-2xx response received: 404 Not Found"

I will remove this. It's silly πŸ˜‚=
=> https://git.mills.io/saltyim/saltyim/issues/169=
=> https://git.mills.io/saltyim/saltyim/issues/169=
Thank you for the thorough reply. It looks like I set my SRV records correctly and registered on your server with my domain, but I get the same error when I try to send you a message.

How can I completely remove salty-chat and its dependencies and start over from scratch?
It looks like I set my SRV records correctly and registered on your server with my domain, but I get the same error when I try to send you a message.
> I assume you created the Well-Known JSON config file on your web server at the top-level of your domain?

Yes, it was there for previous attempts, created exactly as salty-chat make-user told me to each time. I have since deleted that file from my web server, hoping it would fix the crash on the current attempt, but no dice.
@mckinley Sorry for the crappy experience, leave this with me. I'll try to repro and fix ASAP 🀞
@mckinley Sorry for the crappy experience, leave this with me. I'll try to repro and fix ASAP 🀞
@prologic No need to apologize, and take your time. I know Salty is still in its early stages, and this is a project you're doing for free in your spare time. I wish I could help out with the code. If there's any more information I can give you that would be useful, let me know.
@mckinley At this point the biggest help you could provide (aside from what you've already done!) is to try everything out with your own domain against my broker and see how that goes.

@mutefall who graciously documented the setup for a all-in-one setup (get domain, setup domain, stand up broker, etc) did a pretty good job of that docu, but we also probably need more docu.

See if you can tease it apart, but essentially if setup an SRV record for your domain that points to my broker and run salty-chat register nick@yourdomain which _should_ work as it does a lookup for the SRV record if no broker is provided (optional 2nd argument).

If you can get that far, then we've done an "okay" job πŸ˜…
@mckinley At this point the biggest help you could provide (aside from what you've already done!) is to try everything out with your own domain against my broker and see how that goes.

@mutefall who graciously documented the setup for a all-in-one setup (get domain, setup domain, stand up broker, etc) did a pretty good job of that docu, but we also probably need more docu.

See if you can tease it apart, but essentially if setup an SRV record for your domain that points to my broker and run salty-chat register nick@yourdomain which _should_ work as it does a lookup for the SRV record if no broker is provided (optional 2nd argument).

If you can get that far, then we've done an "okay" job πŸ˜…
@prologic I've gotten that far already, no? I'll play with it some more tomorrow and report back.

[mckinley@t430 ~]$ salty-chat lookup mckinley@mckinley.cc
{"Addr":"mckinley@mckinley.cc","User":"mckinley","Domain":"mckinley.cc","Key":"kex1npfcevm7f5u9uhtswa804ph9lp2t6h9ettl3us4jmzk500ylja5snm55en","Endpoint":"https://salty.mills.io/inbox/01G26EQ0WPA6CDCFAVQ5HEJBH3","Avatar":"https://salty.mills.io/avatar/cb89306651329866dccaeca35b54355b284c2be2bbed9b9d473f1d73ba747dcd"}
@mckinley Looks like you have πŸ‘Œ The salty-chat CLI and TUI should "just work"β„’ 🀞
@mckinley Looks like you have πŸ‘Œ The salty-chat CLI and TUI should "just work"β„’ 🀞
I'm getting this error on Win10 (I could try on WSL/Ubuntu)

I'm not a great Go programmer, so I don't have a clue what to do next


lookup seems to work fine

salty-chat lookup me@eapl.mx 

{"Addr":"me@eapl.mx","User":"me","Domain":"eapl.mx","Key":"kex1gj5gxswkp6dl7p5whydx7hx98kunllgrzmf4s2zydnnud7k79epsk5dxag","Endpoint":"/01G25MCTZ4WMFF6B36CGDKDX4T","Avatar":""}
Some other errors when using register


salty-chat register me@eapl.mx
error registering account: unable to find broker for me@eapl.mx: error looking up _salty._tcp.eapl.mx : lookup _salty._tcp.eapl.mx: dnsquery: DNS name does not exist.

salty-chat register prologic@mills.io
error registering account: error registering address: non-2xx response received: 409 Conflict
@prologic i saw this behaviour as well prior to working on the infra-setup. we had to manually pass the -i and -u on the cli to get it working properly if running only salty binary versus saltyd

@mckinley @eaplmx would you mind opening up an issue on this for follow-up? i use mostly cli so can likely assist and work through things async with you. irc is also option
@mckinley the well-known endpoint would follow:

https://mckinley.cc/.well-known/salty/01G268YYHWGNYT9M1M9760KP83.json currently those paths are 404+403
@mutefall I removed my JSON file from my web server because I'm not running a broker on that domain. I'm using @prologic's broker at https://salty.mills.io/ and I have my SRV records set to point there. https://clbin.com/pE8ND
@prologic already has an issue made. We can move discussion over there. https://git.mills.io/saltyim/saltyim/issues/169
@eaplmx I'm not seeing any SRV records for your domain. Are you running a broker at eapl.mx?

[mckinley@t430 ~]$ dig srv _salty._tcp.eapl.mx +short
[mckinley@t430 ~]$ dig srv _avatars._tcp.eapl.mx +short
[mckinley@t430 ~]$ salty-chat lookup me@eapl.mx
{"Addr":"me@eapl.mx","User":"me","Domain":"eapl.mx","Key":"kex1gj5gxswkp6dl7p5whydx7hx98kunllgrzmf4s2zydnnud7k79epsk5dxag","Endpoint":"/01G25MCTZ4WMFF6B36CGDKDX4T","Avatar":""}
Hopefully I responded to each Twt in this Yarn πŸ€—
Hopefully I responded to each Twt in this Yarn πŸ€—
@mckinley Thanks. I'll follow this advice, let's see :)
@prologic Interesting, I missed this guide... Taking a look πŸ‘€
@eaplmx I'm still up if anyone else grows wrong, but I'm also super tired so I've lost all energy to write more code. I've done too much today (silly day job!)
@eaplmx I'm still up if anyone else grows wrong, but I'm also super tired so I've lost all energy to write more code. I've done too much today (silly day job!)
I'm hoping creating a config will help thwart this silly bug that I need to fix πŸ˜‚
I'm hoping creating a config will help thwart this silly bug that I need to fix πŸ˜‚
@prologic hehe, no worries! Good vibes, and have a great rest
@eaplmx Thanks! I'm not ready for bed yet, still drinking 🍷 πŸ˜‚
@eaplmx Thanks! I'm not ready for bed yet, still drinking 🍷 πŸ˜‚
@mckinley @eaplmx I believe with this pr I've squished all bugs found in this Yarn. Thank you both so much for helping spot these two bugs! πŸ™

I would appreciate (_after I merge this_) and cut a new patch release if you'd both re-test and let me know how things go! πŸ™
@mckinley @eaplmx I believe with this pr I've squished all bugs found in this Yarn. Thank you both so much for helping spot these two bugs! πŸ™

I would appreciate (_after I merge this_) and cut a new patch release if you'd both re-test and let me know how things go! πŸ™
@prologic Awesome, I'll update and re-test soon.
@mckinley Thanks! πŸ™‡β€β™‚οΈ
@mckinley Thanks! πŸ™‡β€β™‚οΈ
@prologic I ran the go install command, but I think I'm getting the 0.0.20 version. Should I do something different if I download it from https://git.mills.io/saltyim/saltyim/releases/tag/0.0.21 ?

go install go.mills.io/saltyim/cmd/salty-chat@latest
salty-chat -v
salty-chat version v0.0.0-20220506225044-cea7e7fcf623 built with go1.18.1 (checksum: h1:E3adFfRMLn55i+pPM9s35TkDTCfeQtx6o/6JIXh53t0=)
@eaplmx I think that looks right but I'll double check here in an isolated environment πŸ‘Œ
@eaplmx I think that looks right but I'll double check here in an isolated environment πŸ‘Œ