ekmartin / slack-irc

Connects Slack and IRC channels by sending messages back and forth.
MIT License
588 stars 158 forks source link

public vs private "groups" (channels) #217

Open qriff opened 6 years ago

qriff commented 6 years ago

As a realization from copy/pasting channel mappings:

There would appear to be a bug when mapping (in config.json file) a public slack channel (vs private) without the hash prefix (to a irc channel), the relay becomes one way (irc to slack, not slack to irc, so basically part of it still works).

Bug (messages relayed only from irc-channel-second to slack-public):

    "channelMapping": {
      "slack-private": "#irc-channel-first",
      "slack-public": "#irc-channel-second"
    }

Working (messages relayed both ways between slack-public and #irc-channel-second):

    "channelMapping": {
      "slack-private": "#irc-channel-first",
      "#slack-public": "#irc-channel-second"
    }
ekmartin commented 6 years ago

The second example is correct - look at the example configuration here: https://github.com/ekmartin/slack-irc#example-configuration

Channel/group names are unique in Slack though, so I'd definitely be open to change it so that it works both with and without #. It would need to be done in a backwards compatible manner though.

One way it could be done would be to remove # from all Slack channel names on startup, which could be done here. Then this variable could be removed altogether, in favor of just using channel.name.