matrix-puppet-slack icon indicating copy to clipboard operation
matrix-puppet-slack copied to clipboard

Convert Slack's @channel and @here to @room

Open thomas-profitt opened this issue 6 years ago • 2 comments

screenshot from 2018-03-31 11-21-26 @channel and @here evidently do slightly different things in Slack, but we can forget the nuance and just convert both.

https://github.com/matrix-hacks/matrix-puppet-slack/pull/32 does not adequately address the issue because:

  • It does not handle @here, only @channel (unless Slack converts @here to <!channel> like it does @channel in the payload we get from its API)
  • Because our ghost rooms are created without specifying that level-0 users should be able to @room, and our ghost users are power level 0, the notification doesn't actually fire.

thomas-profitt avatar Mar 31 '18 16:03 thomas-profitt

Here's some documentation on how the room API's power levels option expects its data right now:

{
    "events_default": 0,
    "invite": 0,
    "state_default": 50,
    "redact": 50,
    "ban": 50,
    "kick": 50,
    "notifications": {
      "room": 50,
    },
    "events": {
      "m.room.avatar": 50,
      "m.room.name": 50,
      "m.room.canonical_alias": 50,
      "m.room.history_visibility": 100,
      "m.room.power_levels": 100
    },
    "users": {
      "@example:matrix.org": 100
    },
    "users_default": 0,
  }

Creating rooms with different configuration is something to be implemented in matrix-puppet-bridge, it's only the high-level requirement "we need @channel and @here turned into @room" that belongs here in matrix-puppet-slack's issues.

thomas-profitt avatar Mar 31 '18 16:03 thomas-profitt

Update: We're now converting @channel and @here to @room, but still the ghosts don't have permission to actually notify.

thomas-profitt avatar Oct 28 '18 19:10 thomas-profitt