finnp / gitter-irc-bot

:speech_balloon: Bot that synchronises messages from gitter and irc
141 stars 40 forks source link

Translating mentions #1

Open finnp opened 9 years ago

finnp commented 9 years ago

@maxogden suggested that username: from irc could be translated to @username on gitter.

Not everyone has the same name on irc as on gitter though. Maybe people could inform the bot via pm on irc about their github handles like i am username on github - and maybe an api key so we can make sure they are really that person? That seems a little bit too complicated though.

max-mapper commented 9 years ago

hmm yea anything more advanced would mean adding a database to the bot and that is probably overkill for now

floam commented 8 years ago

That seems a little bit too complicated though.

This could enable users present and authenticated in the IRC channel to have real presence on the gitter end which would be nice.

finnp commented 8 years ago

If gitter implements bot users, users could be emulated as well: https://github.com/gitterHQ/gitter/issues/1076

A workflow that could be used for authenticating users would be:

  1. irc user joins channel
  2. bot sends a pm to the user, informing them that they can authenticate by replying with a GitHub key (doesn't need to have any permissions)
  3. bot saves the irc name and key in a database

Since IRC doesn't protect usernames by default, the user then could then revoke the github key in case that someone impersonates them I guess.

Another maybe more efficient way (for multiple irc/gitter pairs), would be to have a service for connecting GitHub handles with IRC names. Then the bot would just ask, what GitHub names belongs to a irc handle. This service could actually be just a GitHub repository with a table/json file, where people send PRs to with their irc handles. Then they also post a message confirming their IRC identity on a channel. And then someone (or a bot) could check this and merge the PR.

I personally wouldn't want to make the effort of actually implementing this. But if someone is interested in working on this. Feel free to do so.

oxinabox commented 8 years ago

I would like the other way, for mentions (too).

People on Gitter (and indeed in general people used to things like twitter and facebook) tend to say: @foobar I think the bot should change @foobar said on the Gitter side, to be foobar: on the irc side. (After checking not in code blocks etc)