tgcf icon indicating copy to clipboard operation
tgcf copied to clipboard

Error forwarding 1 message 2 times

Open Xulubu opened this issue 4 years ago • 8 comments

Everything is fine except for one error: forward 1 message 2 times. My source is a public channel (join only, no admin rights) The destination is the group that I am an admin for When the source has a message, it will be forwarded twice at the same time I don't know how to fix it, please help, thanks! https://i.imgur.com/E0qVNaB.jpg

Xulubu avatar Oct 17 '21 06:10 Xulubu

Please put a better picture, I can't see much from it. It happened once or is always behaving like this? This can happen in this situation: -you chose not to delete a msg if is deleted in the source -the source sends a msg, then deletes it and sends it again In the source, it will be only 1 msg but in the destination, it will be 2 msgs.

tissole avatar Oct 19 '21 09:10 tissole

I create a private channel and a public group - everything runs great with no errors. When I apply with another private channel (no admin rights), the message is sent 2 times at the same time. I checked the source and waited for more than 10 messages, it still repeats 2 times even though the source message is not deleted. This happens to all channels for which I am not an admin.

https://imgur.com/voVBE1s https://imgur.com/ObS97Yd

Xulubu avatar Oct 19 '21 10:10 Xulubu

Run tgcf live --loud and provide the log when the msgs are send twice.

tissole avatar Oct 19 '21 10:10 tissole

Hi! Yellow is a forwarded message from my channel to my group. The other two messages are from another private channel (not me admin) to my group. It is duplicated. https://i.imgur.com/o2u6KJV.jpeg

Xulubu avatar Oct 20 '21 03:10 Xulubu

Let's clear this stuff a little bit. -1001349387 is a source channel where you're not an admin, right? I can see that at 10.41.57 a message is received there and immediately edited (probably by a bot), then a flood msg occurs. One minute later a new msg is received in that channel or is the same msg? Can you check?

In your destination at 10.41.57 do you have a msg and his copy and another msg and his copy at 10.42.57? Or do you have the same msg at 10.41.57 and at 10.42.57?

tissole avatar Oct 20 '21 12:10 tissole

-Yes, -1001349387 is the source channel (I'm not admin)

  • 10.41.57 and 10.42.57 are two different messages As you said, it was probably edited by the bot, so the message repeats twice in the destination channel.

10.41.57 is the message in the source channel but in the destination channel 2 same messages are sent at the same time All messages received from the source channel are duplicated twice on the destination channel.

So what should I do to fix this situation, thanks!

Xulubu avatar Oct 21 '21 03:10 Xulubu

If this issue originates in the source there is nothing you can do for now. Maybe in the future, this can be avoided by implementing #213. The first msg will be is sent, the script will wait a little bit, and then will edit the msg in the destination.

You can't prevent this from happening but you can use a script to clear the duplicate msgs in the destination if they are identical.

tissole avatar Oct 22 '21 12:10 tissole

Thank you, hope it will be updated soon in the future!

Xulubu avatar Oct 23 '21 01:10 Xulubu