matrix-docker-ansible-deploy icon indicating copy to clipboard operation
matrix-docker-ansible-deploy copied to clipboard

Add matrix-bridge-mautrix-slack role

Open xangelix opened this issue 3 years ago • 8 comments

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

xangelix avatar Nov 02 '22 22:11 xangelix

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

Zocker1999NET avatar Nov 04 '22 19:11 Zocker1999NET

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.

xangelix avatar Nov 04 '22 23:11 xangelix

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.

Zocker1999NET avatar Nov 09 '22 11:11 Zocker1999NET

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.

spantaleev avatar Nov 13 '22 08:11 spantaleev

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)

shawnp0wers avatar Nov 14 '22 15:11 shawnp0wers

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? 🤷🤷🤷)

RoiArthurB avatar Nov 16 '22 02:11 RoiArthurB

@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?

xangelix avatar Nov 20 '22 01:11 xangelix

@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 :)

RoiArthurB avatar Nov 21 '22 07:11 RoiArthurB

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 avatar Jan 03 '23 02:01 xangelix

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

xangelix avatar Jan 03 '23 03:01 xangelix

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

spantaleev avatar Jan 03 '23 06:01 spantaleev

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 avatar Jan 03 '23 17:01 xangelix

I believe all the vars here "should" work.

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

xangelix avatar Jan 03 '23 17:01 xangelix

Submitted issue here: https://github.com/mautrix/slack/issues/9

xangelix avatar Jan 04 '23 21:01 xangelix

Naming issue appears fixed in https://github.com/mautrix/slack/commit/f933a14343ad3bef3059bf64eec02f8a34d81461. This merge request should be ready to go!

xangelix avatar Jan 10 '23 19:01 xangelix