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

Allow Matrix Puppeting from other homeservers (or clarify error status if not possible) #25

Closed
ShadowJonathan opened this issue Sep 11, 2020 · 1 comment · Fixed by #26

Comments

@ShadowJonathan
Copy link
Contributor

ShadowJonathan commented Sep 11, 2020

(Almost verbatim copy of mautrix/telegram#520)

I noticed this while looking through the code for puppeting, it seems that the puppet is trying to send the access token to the same server the application service is currently connected to, is it (simply) possible for the puppeting mechanic to recognise when the access token is not pointing to the currently-connected server, and readjust accordingly?

Or is puppeting through an access token a feature which is granted from the status of Application Service? Does that mean that puppeting through other matrix homeservers will never work? If so, can the error message of "Failed to verify access token." be changed to "Cannot puppet users from another homeserver" when users attempt to give bridges their access token?

@ShadowJonathan
Copy link
Contributor Author

This error seems to happen when switch_mxid is invoked, after which it'll self.start() the puppet, and try to self.intent.whoami() without considering or switching the server to connect to.

This raises InvalidAccessToken(), as the access token for another server isn't valid on the homeserver the bot is currently connected to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant