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

Add Telegram-side highlighting for IRC messages prefixed with username #44

Open
jwflory opened this Issue Mar 14, 2018 · 7 comments

Comments

5 participants
@jwflory
Copy link
Member

jwflory commented Mar 14, 2018

Users on IRC will use another user's nick to highlight their attention. This notification behavior is not translated over to Telegram, which receives them as plain text. For users on IRC-side, it can be confusing if they have notified someone or not.

Add a pre-processing hook for IRC-to-Telegram messages that scan the beginning of the message string for a single "word" prefixed by a :. If this is found, assume the text is a username and prefix the message string with an @.

This improves the user experience for participants in IRC and makes it easier to engage and continue conversations across the bridge.

@jwflory jwflory added the improvement label Mar 14, 2018

@jwflory jwflory added this to the v1.2 milestone Mar 14, 2018

@Chris-Bitler

This comment has been minimized.

Copy link
Contributor

Chris-Bitler commented Mar 14, 2018

I'm not sure prefixing (or suffixing might be what you mean here, since prefixing it would result in something like :jwf [text] as opposed to jwf: [text].) explicitly using a : is the best idea. Most IRC clients allow configuration of what the character after a tab-name-selection will be, or in some cases there is none by default (as is the case with the IRC client I use). Is there potentially a more general way to approach this?

@jwflory

This comment has been minimized.

Copy link
Member Author

jwflory commented Mar 15, 2018

@Chris-Bitler For clarity, I meant prefixing like the following example:

An IRC user types this message:

jflory: Hey there!

In Telegram, the message becomes:

@jflory: Hey there!

It is possible that an IRC user doesn't use a colon, but I think it's the best default to assume. I see this used most often. I'm not sure of a better way to approach it though. What do you think?

@bexelbie

This comment has been minimized.

Copy link

bexelbie commented Mar 27, 2018

I think relying on a particular prefix character or line placement is going to miss some (a lot) of names. Could the bot know the names of the people in the channel from the membership list and just do a replacement for all of those names in the string? So if it see that @jflory is in the room, it turns:

"Hey jflory are you going to make the meeting tonight"
into
"Hey @jflory are you going to make the meeting tonight"

This could also be extended by allowing people to register their irc nicks with the bot so it knew better what to highlight.

@jwflory jwflory modified the milestones: v1.2, v1.2.1 Oct 14, 2018

@jwflory jwflory modified the milestones: v1.2.2, v1.3 Nov 24, 2018

@jwflory jwflory added this to To do in Teleirc development Feb 2, 2019

@jwflory

This comment has been minimized.

Copy link
Member Author

jwflory commented Feb 2, 2019

Discussed in 2019-02-02 RITlug developers' meeting. This issue is targeted for the v1.3 milestone, estimated to release on March 2nd, 2019.


We agreed with @bexelbie's suggestion of how to handle this. The approach we discussed was on start-up, the bot can collect a list of usernames from the Telegram group. If someone joins or leaves the group while the bot is running, this list would be updated. Each IRC message processed by the bridge checks if the message string contains a username of someone in the group. If so, Teleirc prefixes the @ symbol to the detected username in the string.

@nic-hartley volunteered to look at this. We'll check back in at the next developers meeting on Saturday, Feb. 9th.

@nic-hartley

This comment has been minimized.

Copy link

nic-hartley commented Feb 5, 2019

Started work on this. Hopefully will be done in a day or two, but I'm still researching it.

@ct-martin

This comment has been minimized.

Copy link
Member

ct-martin commented Feb 9, 2019

It'd be nice to have a user-level setting to toggle this for people on both sides of the bridge

@jwflory jwflory moved this from Current sprint to In progress in Teleirc development Feb 9, 2019

@jwflory

This comment has been minimized.

Copy link
Member Author

jwflory commented Feb 9, 2019

Discussed in 2019-02-09 RITlug developers' meeting.


No progress yet, mostly docs reading and testing. @nic-hartley aims to submit a PR for this by next developers' meeting on Saturday, Feb. 16th.

In terms of user preferences, we agreed this is a bigger task than can fit into this sprint. But some of work for this issue (e.g. keeping track of Telegram group membership) are useful for implementing user preferences later.

@ct-martin, could you please file a new RFE issue for user-configurable preferences and give some examples of other things that might be helpful for you as a user to configure?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment