Skip to content

support multiple rooms between telegram and xmpp#68

Open
albjeremias wants to merge 11 commits into
jt3k:masterfrom
albjeremias:multirooms
Open

support multiple rooms between telegram and xmpp#68
albjeremias wants to merge 11 commits into
jt3k:masterfrom
albjeremias:multirooms

Conversation

@albjeremias

Copy link
Copy Markdown
Contributor

No description provided.

@ForNeVeR

Copy link
Copy Markdown
Collaborator

Wow, really interesting stuff. Are you done yet? Should I review?

@albjeremias

Copy link
Copy Markdown
Contributor Author

yeah, its done... :) i have been testing it for the last few days... please feel free to comment on how the config should look like... this version will break the current config...

Comment thread sample-config.json Outdated
"type": "supergroup"
},
"messageTemplate": "<b>{name}</b>\n{message}"
"messageTemplate": "***{name}***@[{room}](https://conversations.im/j/{room}@{network}):\n\r{message}"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change this to html!

@ForNeVeR ForNeVeR self-requested a review August 21, 2018 15:19
@ForNeVeR ForNeVeR assigned ForNeVeR and unassigned albjeremias Aug 21, 2018
@albjeremias

Copy link
Copy Markdown
Contributor Author

@ForNeVeR i cannot find any place where i can assigne it back to u...

@ForNeVeR

Copy link
Copy Markdown
Collaborator

Sorry? I've assigned it to myself and I'll review/merge when I'll be able to.

@jt3k

jt3k commented Aug 27, 2018

Copy link
Copy Markdown
Owner

Wonderful code editing, thanks!

I had thoughts about the configuration scheme for connecting multiple chats here #3 (maybe outdated)
I assumed that we would someday want to connect for example two xmpp-conferences of one network,
Or for example 4 chat rooms at the same time [slack_hardcode, xmpp_coders, xmpp_python, telegram_coders]

so I think that the config should look something like this:

{
   // bots configs
  bots: { slack_1, xmpp_bot1,  xmpp_bot2,  tg_bot1,  tg_bot2},
  rooms: {
    // room configs
    slack_hardcode: {}, 
    xmpp_python: {},
    xmpp_coders: {},
    tg_coders: {},
    tg_js: {},
    xmpp_js: {},
  },
  links: [
    // customizing the links between bots and rooms
    ['xmpp_js', 'tg_js', slack_1], // linked chats
    ['xmpp_python', 'xmpp_coders', 'tg_coders'], // another linked chats
/* or maybe:
    [
          'xmpp_bot1@xmpp_python',
          'xmpp_bot2@xmpp_coders',
          'tg_bot2@tg_coders'
    ],
*/
  ],
}

any ideas on this ?
(perhaps not in this pull-request)

@albjeremias

Copy link
Copy Markdown
Contributor Author

hmm I'd rather go for something more simple... like:

{
  "rooms":
  {
      "dev": [
      {
        "xmpp": ["bimo_test@conference.jabber.ru", "otherroom@conference.com"]
        "telegramId": -310606513
      },
      {
        "xmpp": "javascript@conference.jabber.ru",
        "telegramId": [-1001161009393, -162979832132]
      }
      ],
      "prod": []
  },

and on the code we could detect if it is an array... then we do what we need to do... but that complicates a lot the bridging.. and may create funky bugs... i'd rather duplicate the configurations something like:

  "rooms":
  {
      "dev": [
      {
        "xmpp": "otherroom@conference.com"
        "telegramId": -310606513
      },
      {
        "xmpp": "otherroom@conference.com"
        "telegramId": -310606513
      },
      {
        "xmpp": "javascript@conference.jabber.ru",
        "telegramId": -1001161009393
      }
      {
        "xmpp": "javascript@conference.jabber.ru",
        "telegramId": -162979832132
      }
      ],
      "prod": []
  },

the bigger problem... is that this new way of config will make previous configs unusable... that worries me more...

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

Successfully merging this pull request may close these issues.

3 participants