-
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
GoToSocial #10
Comments
I followed https://docs.gotosocial.org/en/latest/api/authentication/ to get a token and now I have values for client_id, client_secret, out-of-band token and access_token. I looked at the configuration files, but didn't find any way to tell which lines in the files Also: The URLs in To try the values I got for my GoToSocial instance it would be helpful if there'd be a description of the content of the configuration files. Can anybody help with that? |
Got this far: Looking at it found halcy/Mastodon.py#248 |
The URL in the config file is where you would get the access tokens from. Full URL should always work, 127.0.0.1 could work if its on the same machine (naturally) and the webbrowser knows where to direct the request to. So if GoToSocial is the only thing running - there is a good chance. If there are more than one domains on the server it would not. It looks to me like you would need |
Yes, I made a config for some other mastodon server and looked at that. I tried to adopt that and filled in the values I got from an app registration and authorization using Maybe I even guessed right, but I now I need to find out how to disable the version check - I guess. Edit Forgot to explain the network setup: GoToSocial runs as a http service internally on |
Yes this should work. But as long as you stay on the same server, even using a world-reachable URL should not leave the machine itself. But this is not an issue anyway as it seems. I have looked at the provided link but I am not sure if I understand correctly. The merged PR states it fixed the issue but you are still experiencing it? As far as I can understand, you'd have to disable version checking on the Mastodon.py side. |
Extending this line to I guess I guessed filling the files with my data right. The file format I generated manually in an editor for the configuration files looks like this: main configuration file
file
file
By default the files reside in If |
Great - I will think about how to integrate this into the README - and mention that GoToSocial works as well! Thank you for figuring this out! |
Sorry to say: GoToSocial doesn't work, yet. Authentication using the token works. But for the rest there's still some work ahead: I'll look into that later. I think it is a great idea to put the information about the configuration format in the README.md anyway! Thanks for your help so far! |
Yes, Mastodon uses an ID that is ever increasing. This is how latest seen posts etc. are determined. If GoToSocial uses a Hash value instead, this could be a problem. Although it might be possible using the ID and a timestamp. |
GoToSocial uses https://github.com/oklog/ulid which are by there definition Lexicographically sortable . The example ID A solution to the problem would be to interpret the ID as a sortable string if it is not an integer. |
I patched tootgroup.py on my instance like this:
This compares the notification.id lexically and seems to work for GoToSocial. This breaks compatibility to mastodon. To get this right with all the information from GoToSocial and Mastodon people I suppose the easy way would be
|
for details read oe4dns#10
I put the changes into a Draft PR: #13 I'll install from my branch to test this with my GoToSocial. |
Could I register an account on your gotosocial instance? I'd like to try to figure out a solution that works on Mastodon/Pleroma as well. Alternatively, a pointer to an open instance that would allow some testing would be great too. |
Finally some time to tackle this!
I tried to register tootgroup.py as a client for my account on your GoToSocial instance and now I understand what you mean. It looks like it is not possible to just provide username and password via the Mastodon API and get the required access tokens in return. ('Mastodon API returned error', 400, 'Bad Request', 'unsupported_grant_type') But this is how it is done with Mastodon and Pleroma. The required tokens/credentials are automatically stored and it just works. That's the reason why it is not explained more thoroughly in the README - There's just nothing to explain. If password auth does not work with GoToSocial one has tp aquire the credentials manaully like you did. This is possible but much more involved as you have experienced. This means I will first solve the message ID problem and then think about the setup process. In the worst case one has to manually create the GoToSocial config. I hope I can think of a better solution though. |
Mastodon.py also supports an OAuth Workflow which is good. Just have to figure out how to implement and select it if reqiuired on first run |
The easy part - figuring out how to manage the different forms of notification IDs - is done. See commit e70155a Application registration using either username/password or OAuth will be harder but I'm on it. |
First implementation of OAuth authorization - tested to work on GoToSocial and Mastodon See commit 821c04d Some cleanup required before this can be merged into master. But it works already |
Let me know when I should test! |
It can be tested NOW directly from Github. I will immediately upload it to pypi.org when I'm done here. The version that enables GoToSocial compatibility is Release v1.5 |
In README.md is said that this works with Pleroma or Mastodon. I'm wondering whether I could use it with GoToSocial also or if there are certain requirements to the fediverse server that are not covered by standards.
If there is anybody having experience with this already I'd be happy if you'd share information.
I like the idea of this software very much and would like to integrate it into my yunohost running GoToSocial (maybe creating a yunohost app package for this reason).
The text was updated successfully, but these errors were encountered: