Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify mpdm channel names #96

Closed
fancypantalons opened this issue Jun 25, 2020 · 4 comments
Closed

Simplify mpdm channel names #96

fancypantalons opened this issue Jun 25, 2020 · 4 comments

Comments

@fancypantalons
Copy link

I've got a prototype implementation if this sounds interesting.

From a UX perspective, mpdm channel names are... definitely a nuisance, following a pattern like:

#mpdm-myself--alice--bob--charlie

I'm experimenting with an alternative mapping that uses the server local chantype '&', eliminates the user's own nickname, and then pulls out the extra hyphens as follows:

&alice-bob-charlie

(Yeah, this isn't really what the '&' chantype is for, but in this context I think it's fine to use it). The benefit here is brevity. The channels are still distinguishable from non-mpdm channels (now by chantype prefix), but they're not nearly as unwieldy.

Obviously this would be a jarring change for existing users so I'd propose a refactoring to centralize the logic for:

  1. Testing if a conversation name represents a channel (right now there's prefix checks all over the place, and it'd be good to put that in one place).
  2. Testing if an IRC channel name maps to a group convo.
  3. Mapping a Slack conversation name to a channel name (this seems to be repeated in a few different places).

Then, make the behaviour switchable with an opt-in command-line flag or other setting if that's desirable.

Thoughts?

@adsr
Copy link
Owner

adsr commented Jun 27, 2020

Yes, definitely opportunities to DRY up the code. Shortening mpdm channel names sounds good to me too. Thanks @fancypantalons.

@fancypantalons
Copy link
Author

Apologies for the spam, this is what I get for not updating and running the UTs before pushing to my repo...

Anyway, a4d8a79 is in good shape, now, I think. I've added an additional test to test_mpim.js and everything passes now after I hunted down a couple regressions.

@adsr
Copy link
Owner

adsr commented Jun 27, 2020

Excellent. I'll go through these next time I'm at a computer.

adsr pushed a commit that referenced this issue Jun 27, 2020
This commit implements the proposal laid out in issue #96.

By default, multi-party direct message chats are directly mapped to an
IRC channel name that matches this scheme:

  #mpdm-mynick--nick1--nick2--nick3

This is pretty unwieldly.  To try and make these channel names a bit
more manageable, this changeset adds a new preference:

  short-group-chat-names

If this is supplied with the login token, these chat names are instead
mapped to this scheme:

  &nick1-nick2-nick3

This uses the server local chat prefix to differentiate between normal
and group chats, removes the current user nick, and then takes out
some extra hyphens to compress the whole thing down.

This is made optional through a preference so as not to disrupt the
current UX.
@adsr
Copy link
Owner

adsr commented Jun 27, 2020

Merged in 86d6e94. Thanks!

@adsr adsr closed this as completed Jun 27, 2020
pbui pushed a commit to pbui/irslackd that referenced this issue Feb 25, 2021
This commit implements the proposal laid out in issue adsr#96.

By default, multi-party direct message chats are directly mapped to an
IRC channel name that matches this scheme:

  #mpdm-mynick--nick1--nick2--nick3

This is pretty unwieldly.  To try and make these channel names a bit
more manageable, this changeset adds a new preference:

  short-group-chat-names

If this is supplied with the login token, these chat names are instead
mapped to this scheme:

  &nick1-nick2-nick3

This uses the server local chat prefix to differentiate between normal
and group chats, removes the current user nick, and then takes out
some extra hyphens to compress the whole thing down.

This is made optional through a preference so as not to disrupt the
current UX.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants