jeyemwey / mumbleSniff

See, who is online with telegram messages.
Other
4 stars 2 forks source link

Two-way-messaging for non-root channels #4

Open s3m1s0n1c opened 5 years ago

s3m1s0n1c commented 5 years ago

Hey Guys,

Is there anyway to fix the messaging outside of root channel?

Root Channel Channel A Channel 1

Messaging To/From Telegram/Mumble works in Root Channel but not in Channel A or Channel 1

Im guessing its something to do with Line 136 `` rootCh = connection.rootChannel;

`` I guess there has to be more added to get the current channel its in before sending messages?

Anyone know how to do this as my Node JS is very vague

Thanks

jeyemwey commented 5 years ago

Hi,

the message event listener only receives messages in the channel that the Mumble user is sitting in.

rootCh = connection.rootChannel; (L138) is only used on the way back (Telegram -> Mumble) when sending messages to a specific channel (here, the root channel).

To let two-way-messaging work in all channels, we would need to monitor all channels. (I don't know how I could bring this to work).

Please note that this isn't my top priority right now, however I'm openly looking at any response to this if anyone could find a resolution.

jeyemwey commented 5 years ago

Maybe, @TheWildBear can help us out here? (I've just seen that he introduced multi-channel-support in the first place.)

s3m1s0n1c commented 5 years ago

I think u miss understood what i was saying..

I have a dedicated channel I use.. When i put the bot in that room the two messages dont work.

If i put it in the root channel it works..

I think it just needs some code to work out what channel its in jnstead of using connection.rootchannel

Thanks for you help n hope that makes sense now..

jeyemwey commented 5 years ago

Can you test wether Mumble->Telegram messaging works?

This would mean that the only listen for user-move(oldChannel, newChannel) (docs here). This is indeed archievable.

TheWildBear commented 5 years ago

Maybe, @TheWildBear can help us out here? (I've just seen that he introduced multi-channel-support in the first place.)

I'll take a look at that soon ;)

TheWildBear commented 5 years ago

Can you test wether Mumble->Telegram messaging works? This would mean that the only listen for user-move(oldChannel, newChannel) (docs here). This is indeed archievable.

At the moment this functionality is not implemented but that could be done relative easily.

s3m1s0n1c commented 5 years ago

Hey Guys,

Sorry if I haven't been clear.. Been busy working n lack of sleep..

So I just did some more testing and below is the results (Now my head is clear).. Hope this helps..

Mumble Root Channel Mumble -> Telegram - Working Telegram -> Mumble - Working

In the Mumble server root channel I can send a message from Mumble and get it on Telegram and send a message back to mumble via Telegram

Mumble Sub Channel Mumble -> Telegram - Working Telegram -> Mumble - Broken

I can send a message from Mumble to Telegram not but from Telegram to Mumble

It seems to only not work when in a sub channel that's NOT root.

Like i said Node JS is a bit outta my league. I'm more PHP, Bash, Windows Batch etc

Thanks heaps Sonic

TheWildBear commented 5 years ago

Okay now I understand what you want. Unfortunately the last and next days I don't have any time for that... @bergiu, could you maybe help with that?

Bergiu commented 5 years ago

Sorry, no time too

TheWildBear commented 5 years ago

Hi @s3m1s0n1c, I just tested a little bit. And on our mumble srv on a sub Channel no message communication between telegram and mumble is possible, as expected... This is not implemented at the moment. At least not on our src... Have you modified it? Greetings Thewildbear

Bergiu commented 5 years ago

I have tested it with wildbear and what he means is:

If we are in the same subchannel as the bot (in mumble), the bot is able to read our messages (in mumble) and send them to telegram. If we are in another subchannel as the bot, the bot can't read our messages and doesn't send them to telegram. And in none of this cases we received a message from telegram inside mumble. But this could be because we tested it within a telegram channel and no group (maybe bots can't read messages in channels).

Bergiu commented 5 years ago

Maybe it's possible to make a workaround like in this post: http://www.skyehaven.net/blog/2012/11/22/listening-rooms-in-a-mumble-channel/

So the idea is to link all mumble channels into one extra channel, where the bot is. Then disable joining into that channel for every user except the bot.

Also maybe this issue is relevant: https://github.com/mumble-voip/mumble/issues/3319

s3m1s0n1c commented 5 years ago

Hi @s3m1s0n1c, I just tested a little bit. And on our mumble srv on a sub Channel no message communication between telegram and mumble is possible, as expected... This is not implemented at the moment. At least not on our src... Have you modified it? Greetings Thewildbear

Mmm okays, I wouldn't of thought it would be hard to implement.. Just some code to get what channel the bot it in when it joins and use the channel variable in when sending messages so it sends messages to the channel not the root channel..

No, I haven't modified any code as my node JS is rusty..

Thanks Sonic

s3m1s0n1c commented 5 years ago

I have tested it with wildbear and what he means is:

If we are in the same subchannel as the bot (in mumble), the bot is able to read our messages (in mumble) and send them to telegram. If we are in another subchannel as the bot, the bot can't read our messages and doesn't send them to telegram. And in none of this cases we received a message from telegram inside mumble. But this could be because we tested it within a telegram channel and no group (maybe bots can't read messages in channels).

Just Clarification, I wouldn't need the bot to message me in a channel the bot isn't in.. All i'm requesting is to have the bot work in a subchannel that people are currently in that I can communicate with both ways..

Thanks Sonic

s3m1s0n1c commented 5 years ago

Maybe it's possible to make a workaround like in this post: http://www.skyehaven.net/blog/2012/11/22/listening-rooms-in-a-mumble-channel/

So the idea is to link all mumble channels into one extra channel, where the bot is. Then disable joining into that channel for every user except the bot.

Also maybe this issue is relevant: mumble-voip/mumble#3319

Good idea, but this also wouldn't work because the bot doesn't work properly without being in the root channel (Unless you link the root channel to another channel). This is the issue i'm trying to get fixed. The bot would have to sit in the root channel..

I will try it but its not really a practical solution..

Thanks Sonic