Skip to content
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

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft

Websocket support for Pleroma #43

wants to merge 9 commits into from

Conversation

kensanata
Copy link
Owner

@kensanata kensanata commented Nov 23, 2019

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.

@kensanata kensanata changed the title Getting the initial files in place Websocket support for Pleroma Nov 23, 2019
@kensanata kensanata added enhancement pleroma This issue needs a Pleroma user to look into it. labels Nov 23, 2019
@kensanata
Copy link
Owner Author

kensanata commented Nov 24, 2019

Check out websockets for some documentation of what I'm trying to do.

@kensanata kensanata force-pushed the websockets branch 3 times, most recently from 98876a3 to 4a6e4ee Compare November 28, 2019 21:49
@kensanata kensanata force-pushed the websockets branch 4 times, most recently from 030d1ae to 38c5f10 Compare December 6, 2019 14:58
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.
@kensanata
Copy link
Owner Author

kensanata commented Dec 8, 2019

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.
@kensanata
Copy link
Owner Author

Still unhappy. For the moment, I am back on the master branch, without websockets. If somebody knows how to do it, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement pleroma This issue needs a Pleroma user to look into it.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant