When two or more chats have pending notifications, every change to the notification stack (a new message in one chat, reading a chat, or the hourly repeat) causes Telegram to re-post notifications for all pending chats, including those whose content has not changed.
This issue persists in build 122. The banners were fixed in the related issue #65055, at the team's request, but unchanged notifications are still re-posted.
Measured behavior (ADB + a test NotificationListenerService on the device):
Build 122 (13.2.2, 72929), with two pending chats: the listener received two posts per new message — the new message's child notification plus an unchanged re-post of the other chat's child notification.
Reading one chat also caused the other chat's child notification to be re-posted.
On version 12.10.1, the entire stack of eight notifications was re-posted within 0.083 seconds. The mUpdateTimeMs of every child changed, while mCreationTimeMs remained unchanged.
A message that was 14 hours old was posted again, even though its notification was no longer displayed.
Why it matters:
FLAG_ONLY_ALERT_ONCE and GROUP_ALERT_* only control the system's own sound and heads-up notifications. A NotificationListenerService receives every notify() call through onNotificationPosted().
Consequently, applications that forward notifications to wearables or other devices treat each re-post as a new message, causing users to receive old messages again whenever another chat's notification changes.
Listener applications cannot reliably filter out these duplicates:
On Android 15+, listeners that are not CDM-associated receive redacted copies of notifications marked as sensitive (including notifications containing any digits). In these copies, the message time is the current time on every re-post.
The first notification post is built from the push notification: its text is truncated to approximately 200 characters, and its timestamp may be off by 1–5 seconds.
The subsequent re-post contains the full text and the actual message timestamp. Therefore, the same message can be delivered twice with different content.
Suggested fix:
In showExtraNotifications(), call notify() only for child notifications whose content has changed (a new message or an edit), and skip unchanged notifications.
Keep the original message timestamp from the push notification so that the full-text update retains the same timestamp.
Steps to reproduce
On Android, receive messages in two different chats and leave both chats unread.
Run adb shell dumpsys notification --noredact and note the mUpdateTimeMs values of both chat notifications, or use a notification listener logger.
Send a new message to chat A.
Run dumpsys again. Observe that chat B's notification has also been updated, with a new mUpdateTimeMs despite its content remaining unchanged. A notification listener receives onNotificationPosted for both chats.
Open chat A and read its messages.
Observe that chat B's notification is posted again.
Current result
Whenever the notification stack changes, Telegram re-posts notifications for all pending chats, including notifications whose content has not changed. This generates redundant onNotificationPosted() events and can cause external notification-forwarding applications to deliver previously received messages again.
Expected result
Telegram should call notify() only for child notifications whose content has actually changed due to a new message or an edit. Unchanged notifications should not be re-posted.
The original message timestamp should also be preserved across the initial push notification and subsequent full-text updates.