When several chats have pending notifications, ONE new message makes Android show heads-up banners for OTHER chats that received nothing. Reading one chat does the same.
MEASURED (adb, reproduced on demand with two bots)
One new message -> 2 banners: the receiving chat plus an unrelated one. Reading one chat -> 2 banners, both unrelated.
All banners were group CHILD notifications (isSummary=false).
showExtraNotifications() re-publishes the whole stack on every change: 8 notifications in 0.083 s. Re-posts keep the same mCreationTimeMs: updates, not re-creations.
No notification carries FLAG_ONLY_ALERT_ONCE; setOnlyAlertOnce never appears in NotificationsController.java.
WHY IT IS APP-SIDE
Children already carry GROUP_ALERT_SUMMARY (NotificationsController.java:5618), so the alerting notification is the group summary. SystemUI transfers its heads-up to a child (HeadsUpCoordinator.findBestTransferChild). Repetition is gated by shouldHunAgain(): !entry.hasInterrupted() || (flags and FLAG_ONLY_ALERT_ONCE) == 0. Without the flag this is always true, so every re-post re-alerts on stock Android too - one banner there, one per chat on ColorOS, which also ignores GROUP_ALERT_SUMMARY for children.
SUGGESTED FIX
Set FLAG_ONLY_ALERT_ONCE on the group summary when the rebuild is not caused by a new incoming message (read/dismiss/refresh), and leave it off when a message actually arrives.
ALSO
While 2+ chats are pending, per-chat notifications move to the internal Other channel, so users cannot suppress repeats per chat; blocking it is auto-reverted by checkOtherNotificationsChannel().
repeat_messages defaults to 60 min, so from 11:00 to 22:00 the whole stack re-posts and re-alerts hourly while one personal message stays unread.
Steps to reproduce
On Android, keep notifications for private chats enabled (default).
Receive messages in 4-5 different chats and leave them all unread, so several Telegram notifications are pending at the same time. Two or more is enough: grouping (useSummaryNotification) turns on from two chats.
Leave the phone unlocked on the home screen and wait for ONE new message to arrive in one of those chats.
Observe: a heads-up banner appears for the chat that received the message AND for at least one other chat that received nothing new.
Now open Telegram and read one of the pending chats.
Observe: heads-up banners appear again for the remaining chats, showing old content that has not changed.
With only one pending chat the bug does not happen - grouping is not used, and the notification behaves normally.
Still reproducible in 13.1.1 (72371) on OnePlus 15, ColorOS 17.0.0.102 (SDK 37). logcat: on each update all chat notifications are re-posted with flags=AUTO_CANCEL (no ONLY_ALERT_ONCE), groupAlertBehavior=GROUP_ALERT_SUMMARY; ColorOS SystemUI still shows heads-up for every child. 9 updates in 12 min -> 17 banners, even when the summary was on the silent channel. Disabling banners for the "Other" channel is not a workaround: ColorOS then shows no heads-up at all (it never shows heads-up for the group summary). Suggested fix: setOnlyAlertOnce(true) for every dialog except the one that just received an alerting message.
No heads-up banners with 2+ chats on ColorOS Devices: Oppo Find X9 Pro, X9 Ultra, Find N6, all firmware from ColorOS 16 to 17 (e.g. CPH2765_17.0.0.101). Telegram 13.1.1 (7237). Oppo has been notified, no reply yet. This looks like an incompatibility, not a bug in either side.
Cause: with 2+ chats, the summary alerts (GROUP_ALERT_ALL) and children move to "Internal notifications" (importance 3, GROUP_ALERT_SUMMARY). ColorOS shows no heads-up for a group summary, and children can't show one at importance 3.
Fix (patch attached): GROUP_ALERT_CHILDREN, so the new message's child alerts in its own chat channel. Other children keep their channel with setOnlyAlertOnce(true). The summary uses the loudest child's channel. Tested on Find N6; video of my build attached.
Downside of my self-signed build: Firebase issues no FCM token, so Keep-Alive Service and Background Connection must stay on.
Unchanged: silent messages move a chat to the importance 2 "Silent" channel, which ColorOS hides from the lock screen until the next normal message. Groups stay limited to 2 alerts per 3 minutes.
logcat: on each update all chat notifications are re-posted with flags=AUTO_CANCEL (no ONLY_ALERT_ONCE), groupAlertBehavior=GROUP_ALERT_SUMMARY; ColorOS SystemUI still shows heads-up for every child. 9 updates in 12 min -> 17 banners, even when the summary was on the silent channel.
Disabling banners for the "Other" channel is not a workaround: ColorOS then shows no heads-up at all (it never shows heads-up for the group summary).
Suggested fix: setOnlyAlertOnce(true) for every dialog except the one that just received an alerting message.
Devices: Oppo Find X9 Pro, X9 Ultra, Find N6, all firmware from ColorOS 16 to 17 (e.g. CPH2765_17.0.0.101). Telegram 13.1.1 (7237). Oppo has been notified, no reply yet. This looks like an incompatibility, not a bug in either side.
Cause: with 2+ chats, the summary alerts (GROUP_ALERT_ALL) and children move to "Internal notifications" (importance 3, GROUP_ALERT_SUMMARY). ColorOS shows no heads-up for a group summary, and children can't show one at importance 3.
Fix (patch attached): GROUP_ALERT_CHILDREN, so the new message's child alerts in its own chat channel. Other children keep their channel with setOnlyAlertOnce(true). The summary uses the loudest child's channel. Tested on Find N6; video of my build attached.
Downside of my self-signed build: Firebase issues no FCM token, so Keep-Alive Service and Background Connection must stay on.
Unchanged: silent messages move a chat to the importance 2 "Silent" channel, which ColorOS hides from the lock screen until the next normal message. Groups stay limited to 2 alerts per 3 minutes.