And by the way. It uses execute A LOT. Like, more than half the API requests it makes are the `execute` method. This exposed some more bugs and corner cases in my interpreter.
Thankfully, I didn't have to decompile it. I just asked the guy who worked on it back then 🙃 It turns out it does support `sizes`. After I removed that key, photo attachments started showing up.
Can't get it to display media attachments in posts =/ I'm sure I return all the fields that there should be, but it still acts like the attachment isn't even there. But it does display polls for some reason
Newsfeed now works as well. This needed some object unwrapping because I did the sensible thing and just made feed entries contain post objects, not this atrocity with `type` and a bunch of different fields depending on what that type is
I feel like I'll have to decompile the app to see what exactly it expects in a photo object... Maybe something undocumented? Maybe it expects some numbers to be strings? I remember the developers having problems with that (because, naturally, I know both people who worked on this app)
So I managed to make the newest app of the three do this. And yes, all those `execute`s are a serious problem. For example, when you create a wall post using the wall.post method, VK would return just an object with {"post_id": 123}. So the app runs an execute that calls wall.post and then wall.getById.
But Smithereen returns the post object straight from wall.post because why not. But of course that breaks that execute. And there are TONS of things like this, unfortunately.
Ooooh interesting. It tries to concatenate arrays using the + operator. I don't think I implement that. Because of this, it can't load the friend list.
Now friends.get returns a permission error for some reason. It shouldn't do that. A token that was obtained using password grant should bypass all permission checks, but for some reason, in this particular case, it doesn't, hmm.
One thing I didn't realize is that these apps are new enough to know about `execute`. Smithereen does have that, it's even better than VK's but fully backwards compatible. However, the code that they execute surely assumes things about older API response formats 🤔
Now here's the first obstacle: how do I make these apps talk to something I control instead of the real VK servers. For testing I could just put things into /etc/hosts I guess? Oh and I also have to do the self-signed SSL certificate thing because they all use HTTPS for authentication (and only for it, all API calls happen over plaintext HTTP)