Closed KyleMaas closed 3 years ago
No, that was needed to get the "Get msg" buttons working, because the ssb-msg template's getOOO calls SSB.getOOO, which tries to call SSB.connected. That fails because SSB.connected didn't exist, so I had to build an SSB.connected function based on inferring from SSB.getOOO what it was supposed to do.
Thanks for opening this PR. I fixed it a bit differently so gonna close this.
That actually doesn't fix one of the issues I ran into. I initially tried just getting rid of SSB.connected, like you did here:
But I found that without that, if you clicked "Get msg" before it had actually connected to something (room, pub, etc.), then SSB.net and/or SSB.net.ooo would not exist, and you'd get an exception. Rebuilding SSB.connected like that resulted in it not only not trying to use those before they exist, but also made the request asynchronous. I figured that was how it was originally built to work and seemed like a good way to do it, and it worked very well for me.
If you load a thread containing messages which are outside of your graph, the thread view will show those messages with little "Get msg" links. If you clicked these, they would not work. This fixes that so they do work.