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

titles for newly created rooms are ignoring NamePatterns

Open ericmigi opened this issue 4 years ago • 24 comments

Screenshot-20200407203113-542x61

namePatterns:
  user: :name [:team? - :team,]  Slack
  room: :name [:team? - :team,]  Slack
  group: :name - Slack

ericmigi avatar Apr 08 '20 18:04 ericmigi

what is the content of the m.room.canonical_alias state event?

Sorunome avatar Apr 08 '20 18:04 Sorunome

{
  "type": "m.room.canonical_alias",
  "sender": "@slackbot:eric.nova.chat",
  "content": {
    "alias": null,
    "alt_aliases": [
      "#slack1__t02_a11_s1_m=2d_g_e_y5_l_d_e8_m:eric.nova.chat"
    ]
  },
  "state_key": "",
  "origin_server_ts": 1586316519983,
  "unsigned": {
    "age": 2702
  },
  "event_id": "$M9N6QthSmG3XVmSptLF3CvD6my5WHGYs8PHqH67Tfnw",
  "room_id": "!LFwfUKtkhJBUzfGHdL:eric.nova.chat"
}

ericmigi avatar Apr 08 '20 18:04 ericmigi

This is a riot-web bug then, not following the spec. Mind opening an issue with them, that they are calculating the room name wrong?

Sorunome avatar Apr 08 '20 18:04 Sorunome

It worked 2-3 days ago, before a recent update to mx-puppet-slack. I haven't changed anything in the config.yaml.

ericmigi avatar Apr 08 '20 18:04 ericmigi

spec says that alt_aliases must be ignored when calculating the room name, which doesn't seem to be the case here :/

Sorunome avatar Apr 08 '20 18:04 Sorunome

Where is the correct room name being listed? the name in slack is 'jared, steph' and with my name pattern it should be 'jared, steph - YC Slack'

ericmigi avatar Apr 08 '20 18:04 ericmigi

The room name should be empty and no canonical alias is set - as such riot should calculate it off of the participants

Sorunome avatar Apr 08 '20 18:04 Sorunome

Hmm so then names would revert back to things like mpdm-jared--ericmigi--uri-1 - YC Slack?

ericmigi avatar Apr 08 '20 20:04 ericmigi

that part should be taken care of by now, too, that they don't do that

Am 8. April 2020 22:11:38 MESZ schrieb Eric Migicovsky [email protected]:

Hmm so then names would revert back to things like mpdm-jared--ericmigi--uri-1 - YC Slack?

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/Sorunome/mx-puppet-slack/issues/50#issuecomment-611168749

Sorunome avatar Apr 09 '20 04:04 Sorunome

looks like riot.im/app is not rendering the room names correctly. Is this still a riot problem?

image

latest dockerhub release

ericmigi avatar Apr 27 '20 04:04 ericmigi

what does the m.room.canonical_alias state event look like? Accessible via /devtools

Sorunome avatar Apr 27 '20 07:04 Sorunome

oh, and m.room.aliases

Sorunome avatar Apr 27 '20 07:04 Sorunome

{
  "type": "m.room.canonical_alias",
  "sender": "@_eric_slack_bot:nova.chat",
  "content": {
    "alias": null,
    "alt_aliases": [
      "#_eric_slack___t02_a11_s1_m=2d_c012_c_b_k_e3_q_e:nova.chat"
    ]
  },
  "state_key": "",
  "origin_server_ts": 1587944126015,
  "unsigned": {
    "age": 34298
  },
  "event_id": "$cx3AN3sOM9_YodmAKAlK6fxl_vYJ0rymvTrLqvubPxo",
  "room_id": "!BeOWovhVCIfcuOBNbh:nova.chat"
}

no listing for m.room.alias image

ericmigi avatar Apr 27 '20 15:04 ericmigi

Alright, that looks like a riot-web bug, then. They are not following the spec by not ignoring alt_aliases

Sorunome avatar May 02 '20 09:05 Sorunome

@Sorunome riot-web says: “The spec says Note that clients should avoid using alt_aliases when calculating the room name. Note it does not say must so it is not in breach of the spec.”

jmastr avatar Jun 02 '20 17:06 jmastr

Well...use a different client, then :/

Am 2. Juni 2020 19:15:25 MESZ schrieb Julian Strobl [email protected]:

@Sorunome riot-web says: “The spec says Note that clients should avoid using alt_aliases when calculating the room name.> Note it does not say must so it is not in breach of the spec.”>

-- > You are receiving this because you were mentioned.> Reply to this email directly or view it on GitHub:> https://github.com/Sorunome/mx-puppet-slack/issues/50#issuecomment-637689544

Sorunome avatar Jun 02 '20 17:06 Sorunome

I do, iOS works :)

jmastr avatar Jun 02 '20 17:06 jmastr

If they decide to do their own thing and not follow the spec? SHOULD is a strong recommendation. SHOULD isn't COULD.

Not the first time seeing such stuff :/

Am 2. Juni 2020 19:15:25 MESZ schrieb Julian Strobl [email protected]:

@Sorunome riot-web says: “The spec says Note that clients should avoid using alt_aliases when calculating the room name.> Note it does not say must so it is not in breach of the spec.”>

-- > You are receiving this because you were mentioned.> Reply to this email directly or view it on GitHub:> https://github.com/Sorunome/mx-puppet-slack/issues/50#issuecomment-637689544

Sorunome avatar Jun 02 '20 17:06 Sorunome

Like with iOS, RiotX client on Android also does not experience this issue. It looks like it is only electron-based clients then.

matejdro avatar Jun 04 '20 03:06 matejdro

A question: since this is only happening on mpim groups, but regular channels work fine, can't you use same naming method that works for both mpim and channels?

matejdro avatar Jun 08 '20 09:06 matejdro

as mpim channels don't have a name at all, their name is expected to be calculated out of the name of the participants. By leaving the canoncial_alias blank, the client should do that.

Normal channels don't have that issue as they have an explicit name set.

Sorunome avatar Jun 08 '20 10:06 Sorunome

Maybe, until Riot fixes things, you could set the name of the explicitly on the server? Then this feature can be removed if/when Riot actually fixes this on their side.

matejdro avatar Jun 08 '20 11:06 matejdro

No, that will lead to more hassle and stuff, and once riot fixes itit'll have to be reverted.

Soru already catered to quite a few weird quirks of riot, but the reward simply isn't large enough for this. Riot just has to fix it. Tell them about how important it us to fix this, instead.

Am 8. Juni 2020 13:30:07 MESZ schrieb "Matej Drobnič" [email protected]:

Maybe, until Riot fixes things, you could set the name of the explicitly on the server? Then this feature can be removed if/when Riot actually fixes this on their side.

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/Sorunome/mx-puppet-slack/issues/50#issuecomment-640545762

Sorunome avatar Jun 08 '20 11:06 Sorunome

There doesn't seem to be any movement on the Riot/Element side of things, here. And given this likely impacts a lot of projects using the JS SDK, any chance we could revisit the idea of a workaround? Unfortunately, as it stands, the bridge is pretty broken for me given how many group chats I find myself in...

fancypantalons avatar Apr 04 '21 03:04 fancypantalons