-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Websocket support for Pleroma #43
base: master
Are you sure you want to change the base?
Conversation
f8fc7a2
to
258019f
Compare
Check out websockets for some documentation of what I'm trying to do. |
98876a3
to
4a6e4ee
Compare
030d1ae
to
38c5f10
Compare
Right now all the other timelines (local, federated, hashtags, lists) still connect to the old streaming URLs which don't work on Pleroma! Also, Pleroma doesn't handle our OAuth scopes (we're getting an unsupported_grant_type error). User timeline now uses websockets instead of streaming (chunked HTTP responses).
The old streaming API code was removed. Currently the hashtag and list timelines don't work. You keep getting a topic setup message every 5s: «root TOPIC BitlBee groupchat: "scotland". Please keep in mind that root-commands won't work here. Have fun!»
The problem seems to be that the URL for hashtag and list websockets is freed, and thus the mw->url pointer points into garbage.
If it's an error, use imcb_error. Capitalize all messages.
In mastodon_ws_in_callback, only attempt to read stuff if the state says we're connected.
Looks like this part is done! I'm using the websocket branch right now. More testing, more daily use required, of course. All the testing needs to happen with Mastodon, however! It still doesn't work for Pleroma because of OAuth issues. See #37. |
In addition to using the Authorization HTTP header, we're sending the authorization token as a parameter, even though I think that's wrong. But if you do it, it works... Apparently that's how MastoFE communicates with the backend, too. We're also ignoring 0 length messages. I wonder what that is all about. Sadly we're still getting disconnected every two minutes.
Still unhappy. For the moment, I am back on the master branch, without websockets. If somebody knows how to do it, let me know. |
Right now the websocket response response seems to be wrong so you can no longer connect to Mastodon instances, and we're still connecting to the old streaming URLs so definitely cannot connect to Pleroma instances. Also, Pleroma doesn't handle our OAuth scopes (we're getting an unsupported_grant_type error).
Liberally copying and pasting from bitlbee-discord.