TediCross icon indicating copy to clipboard operation
TediCross copied to clipboard

[Request] Only bridge certain senders

Open hmlendea opened this issue 3 years ago • 4 comments

Hi,

Would you consider adding a feature that will make it so that the bridge will only forward messages coming from certain users?

There could be a (whitelist) config for a comma-separated list of Telegram users, and another for Discord users, and only their messages will be relayed, the other messages coming from other users being ignored.

Likewise, it might be nice to also have the opposite (a blacklist): configs with lists of users whose messages are not relayed, while everyone else's will be.

hmlendea avatar Nov 23 '21 18:11 hmlendea

We would certainly accept a Pull Request.

trgwii avatar Nov 23 '21 19:11 trgwii

Good to know.

I'm going to look into this (when I will have some free time). But, I'm not really knowledgeable in regards to JS, so I can't promise anything.

hmlendea avatar Nov 23 '21 19:11 hmlendea

I'd totally support this feature. I can try making a PR whenever I have time. I'm not fluent in JS tho, but cmon it can not be that difficult (famous last words).

Maybe create an array of strings on the configuration files with the user IDs allowed to cross post, and check them at runtime comes to mind.

EDIT: I see that this is already implemented and in checking progress. Hope it gets merged into stable soon!

forcegk avatar Oct 07 '23 12:10 forcegk

@forcegk I've already gave that a shot, and it seemed to have worked, but I never found the time/willingness to finish it up and make it proper enough to PR-able. If you want you can take a look and maybe finish it.

I have a few instances running with that code on RPI and they do get the job done.

hmlendea avatar Oct 09 '23 13:10 hmlendea