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

Add matrix-bridge-mautrix-slack role #2227

Merged
merged 12 commits into from
Jan 11, 2023

Conversation

xangelix
Copy link
Contributor

@xangelix xangelix commented Nov 2, 2022

Add support for mautrix-slack. Inherits greatly from the mautrix-discord role.

@Zocker1999NET
Copy link
Contributor

Also probably the role should be moved to roles/custom where the other roles live now after the last change

Copy link
Contributor

@Zocker1999NET Zocker1999NET left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except of merging setup.yml manually & moving the role to roles/custom, these should be all changes required to make this role compatible to the current main branch.
At least I got the bridge up & running.

@xangelix Thanks for your work of migrating mautrix/slack into this playbook!

@xangelix
Copy link
Contributor Author

xangelix commented Nov 4, 2022

Thanks a ton @Zocker1999NET for the checklist, makes the migration a lot easier.

Unrelated to that change, were the slack puppets able to be created properly in your instance? I may have gotten configs messed up, it seems the bridge is only able to puppet my own account.

@Zocker1999NET
Copy link
Contributor

Unrelated to that change, were the slack puppets able to be created properly in your instance? I may have gotten configs messed up, it seems the bridge is only able to puppet my own account.

@xangelix sadly I have a very inactive Slack, so I couldn't test if messages from the puppets are bridged ... But I have problems with DMs not being bridged.

@spantaleev
Copy link
Owner

Do you think this works well enough to be merged now?

As for various problems with bridging.. I wonder if the bridge is fully-featured or stable enough for us to be recommending it over appservice-slack, etc.

@shawnp0wers
Copy link

As for various problems with bridging.. I wonder if the bridge is fully-featured
or stable enough for us to be recommending it over appservice-slack, etc.

For what it's worth, this bridge appears to function without the need for a slack-side app/api. Several of the Slack workspaces I need to bridge with don't allow app/api access. That might make this bridge worth any warts it might have.

(Full disclosure, I'm very new to Matrix, but I've been watching this pull request because of that nuance regarding this Slack bridge vs the others)

@RoiArthurB
Copy link
Contributor

I tried this on my personal instance, and so far, so good with the several slacks I bridged.

However, since this project moved to galaxy roles, some works have to be redone (I'd be happy to commit the modifications I did on this branch if you give me the access).

Also, there's a small "bug" of opening plenty of "Slack Bridge Bot" rooms... Not sure what it is about so far (bug or just threads? 🤷🤷🤷)

@xangelix
Copy link
Contributor Author

@RoiArthurB were the above changes mentioned by Zocker after moving to galaxy roles not all of the needed ones?
also, did you test this role specifically, or the bridge?

@RoiArthurB
Copy link
Contributor

@RoiArthurB were the above changes mentioned by Zocker after moving to galaxy roles not all of the needed ones?

Was enough, moving files and replace galaxy's project new variable (like the link to postgresql).

also, did you test this role specifically, or the bridge?

This role precisely in my matrix-docker-ansible-deploy instance :)

@xangelix xangelix force-pushed the add-matrix-mautrix-slack-role branch from e260aab to f4874d2 Compare January 3, 2023 02:09
@xangelix
Copy link
Contributor Author

xangelix commented Jan 3, 2023

Only seems to bridge the logged-in user both ways, other users not working.
Not sure why getting these errors / what's wrong with the localpart:
Failed to send media message 2023-01-03 01:53:02.000469079 +0000 UTC to matrix: failed to ensure joined: failed to ensure registered: failed to POST /_matrix/client/v3/register: M_EXCLUSIVE (HTTP 400): Invalid user localpart for this application service.

@xangelix
Copy link
Contributor Author

xangelix commented Jan 3, 2023

Scratch that, all is now in order--appears to be fully functional except for displaynames.

@spantaleev
Copy link
Owner

What's wrong with display names? Is it an upstream problem or some misconfiguration? Do upstream report them as working?

@xangelix
Copy link
Contributor Author

xangelix commented Jan 3, 2023

Config properly sets these vars to:

  bot_displayname_template: '{{.Name}} (bot)'
  channel_name_template: '#{{.Name}}'
  displayname_template: '{{.RealName}} (S)'

However all the bridged users have their full Slack ID as the display names.

image

I posted in the mautrix slack matrix channel for now, but will post an issue upstream if I don't hear back.
No one else has reported this problem, so it's quite possible I've misconfigured something.

@xangelix
Copy link
Contributor Author

xangelix commented Jan 3, 2023

I believe all the vars here "should" work.

https://github.com/slack-go/slack/blob/master/users.go

@xangelix
Copy link
Contributor Author

xangelix commented Jan 4, 2023

Submitted issue here: mautrix/slack#9

@xangelix
Copy link
Contributor Author

Naming issue appears fixed in mautrix/slack@f933a14.
This merge request should be ready to go!

@spantaleev spantaleev merged commit 4e40ac5 into spantaleev:master Jan 11, 2023
spantaleev added a commit that referenced this pull request Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants