tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

Duplicate Message Issue in Third-Party Clients telega and unigram with Large Group Chats (2000+ members) #2667

Closed LuciusChen closed 11 months ago

LuciusChen commented 12 months ago

Problem Description:

When using the telega (Telegram client for Emacs) and unigram clients, I've encountered an unusual issue. When sending a message in a group chat with more than 2000 members, the message appears duplicated. However, upon switching to another chat and re-entering the group chat, the message is displayed only once.

Steps to Reproduce:

Log in to your Telegram account using telega or unigram. Enter a group chat with more than 2000 members. Send a message. Observe whether the issue of the message appearing twice occurs.

Expected Behavior:

Ideally, the sent message should be displayed only once, and duplicates should not appear.

Actual Behavior:

Messages are displayed twice after being sent. However, upon switching to another chat and re-entering the group chat, only one instance of the message is shown.

Environment Information:

telega Version: [telega v0.8.202 (TDLib v1.8.20-dd77e46) (telega-server v0.8.2)] unigram Version: [unigram 10.2 (9076) X64 Direct]

Additional Information:

This issue occurs in both telega and unigram clients but seems to be absent in the official Telegram client. It may be related to the integration with third-party clients, and I'm hoping for an improved user experience on these clients.

https://github.com/tdlib/td/assets/4947981/cae2fc6d-1f04-4cfc-add5-8085f8f7b6f0

LuciusChen commented 12 months ago

The issue persists even when rolling back tdlib to the early version 1.8.16, indicating that the problem has been present for quite some time.

levlam commented 11 months ago

This is a known server-side issue, which affects all apps. There is no way to workaround client-side short appearance of the second message. Can you reliably reproduce the issue? If so, could you write to https://t.me/tdlib_bot?

LuciusChen commented 11 months ago

This is a known server-side issue, which affects all apps. There is no way to workaround client-side short appearance of the second message. Can you reliably reproduce the issue? If so, could you write to https://t.me/tdlib_bot?

sending messages in a group with more than 2000 members can reproduce this issue.

I also sent this message on the bot's side.

zevlg commented 11 months ago

Thanks for adding this workaround! 🔥