mautrix / slack

A Matrix-Slack puppeting bridge
GNU Affero General Public License v3.0
61 stars 17 forks source link

Slackbot renamed all the Slack rooms without the name #7

Open wapsi opened 1 year ago

wapsi commented 1 year ago

I updated my bridge to the most recent version from git (2022-10-12 13:00 EET), and after I started the new bridge it immediately renamed all my Slack rooms to names without the original Slack room name:

image My room naming configuration:

# Bridge config
bridge:
    # Localpart template of MXIDs for Slack users.
    # {{.}} is replaced with the internal ID of the Slack user.
    username_template: slack_{{.}}
    # Displayname template for Slack users.
    # TODO: document variables
    displayname_template: '{{.RealName}} (Slack)'
    bot_displayname_template: '{{.Name}} (Slack bot)'
    channel_name_template: 'Slack #{{.Name}}'
    portal_message_buffer: 128

It seems that the bridge is not able to update the #{{.Name}} to the real Slack room name anymore?

erebion commented 1 year ago

I've noticed that as well.

Might this be related to https://github.com/mautrix/slack/commit/0f7a581f9a265a866a9aaa04308af6c0f7eab89a?

This was shortly before you opened the issue.

vurpo commented 1 year ago

I haven't been able to reproduce, however I cleaned up the code handling this metadata (conversation type, name, topic) in 7be1c76.

Many of the portal metadata issues I've seen other people report seem to indicate the Slack API is giving strange data when asked for conversation info, but I haven't figured out exactly how to debug it since I haven't gotten those kinds of responses myself.

erebion commented 1 year ago

Please let us know if there's a way to help by looking at specific things in the log.

erebion commented 1 year ago

Do we have a workaround for this?

erebion commented 1 year ago

Just logged out and back in, this seems to have solved it. Or maybe it was a restart of the bridge when I updated to the most recent commit a few days ago.