Prioridade/Gravidade : baixa
Plataforma : Windows/Android
Descrição : No Windows e no Android, estou vendo uma notificação de mensagem pessoal não lida, mas quando clico nela, diz que a página não existe ou é privada.
Parece não haver como eu limpar a notificação, já que não consigo ler a mensagem.
Etapas para reproduzir : Não tentei reproduzir, mas o que aconteceu foi que fui removido como destinatário enquanto a mensagem estava não lida, então não tenho mais permissão para visualizar a mensagem.
2 curtidas
Moin
Junho 13, 2024, 9:22pm
2
O número desaparece quando você recarrega o site?
Foi o que eu fiz para me livrar da notificação de um like quando alguém curtiu uma das minhas postagens e a excluiu imediatamente depois.
1 curtida
Moin
Junho 13, 2024, 9:37pm
4
Consegui reproduzir o problema.
Clicar em Dismiss removeu a notificação.
1 curtida
sam
(Sam Saffron)
Junho 14, 2024, 3:51am
5
Se você não conseguir dispensá-la de cima, talvez tente dispensá-la do seu perfil, aba de notificações (há um “dispensar tudo”)?
Acho que há 2 perguntas aqui
Como o bug aconteceu (minha suposição, talvez ser expulso de um PM possa desencadear isso)?
Como fazer essa notificação irritante desaparecer (espero que as opções de dispensar ajudem)
2 curtidas
Moin
Junho 14, 2024, 6:04am
6
Segui os passos do primeiro post
Enviar uma mensagem para um usuário
Remover o usuário da mensagem
Entrar como este usuário
Livrar-se da notificação dispensando todas as notificações
2 curtidas
Moin
Agosto 29, 2025, 4:29pm
7
Isso ainda acontece e ainda é difícil se livrar da notificação. Em particular, você não pode dispensar a notificação única, então primeiro precisa verificar todas as outras notificações causadas por mensagens.
Até certo ponto, isso é até mesmo uma vulnerabilidade de segurança, pois o usuário não deve mais ter acesso ao título da mensagem.
2 curtidas
sam
(Sam Saffron)
Agosto 31, 2025, 11:43pm
8
Coloquei um lembrete para a equipe triar nas próximas semanas.
2 curtidas
Moin
Dezembro 8, 2025, 5:23pm
10
Há alguma notícia sobre isso?
Ainda acho preocupante que usuários que removo de uma MP ainda possam ver alterações de título. Isso afeta minha capacidade de renomear um tópico que converto em uma mensagem pessoal. Há um motivo pelo qual removo o usuário, e eu não quero que ele tenha acesso ao novo título.
2 curtidas
Vou ver se consigo reproduzir
2 curtidas
Estávamos de fato perdendo um caminho de “limpeza” ao remover usuários de MPs (diretamente ou através de um grupo).
main ← fix-phantom-notification-after-being-removed-from-a-pm
opened 10:58AM - 09 Dec 25 UTC
Users were experiencing "phantom notifications" - seeing an unread notification … count but being unable to find or dismiss the notifications. This happened because notification counts don't verify PM access, while the notification list filters out inaccessible ones.
The root cause was that notifications weren't being deleted when users lost PM access through various paths: being removed directly, having their group removed, or being removed from a group.
This fix:
- Adds `Notification.orphaned_pm_notifications` scope to identify notifications for PMs the user can no longer access
- Calls cleanup from `Topic#remove_allowed_user`, `Topic#remove_allowed_group`, `Group#remove`, and `Group#bulk_remove`
- Adds cleanup to `Notification.ensure_consistency!` as a safety net
- Includes a migration to clean up existing orphaned notifications
Report - meta/t/311995
2 curtidas
Moin
Dezembro 9, 2025, 11:19am
14
Acho que isso também corrigirá Sticky unread reply notification .
Moin
Janeiro 12, 2026, 8:41pm
15
Isto está aberto há algum tempo. Algo mais é necessário para isto, ou simplesmente não houve tempo para revisá-lo e mesclá-lo até agora?
Tenho trabalhado na correção da causa raiz de várias inconsistências relacionadas às contagens de notificações, então meu PR acima foi substituído por este
main ← fix/stuck-notification-count
approved 05:24PM - 06 Feb 26 UTC
Users were seeing a notification badge count that didn't match what was actually… shown in the notification list - the classic "stuck notification count" bug.
## Root Causes
This was caused by three separate issues:
1. **Hard-deleted topics**: The `visible` scope SQL had a logic error. When checking for deleted topics via LEFT JOIN, the condition `topics.id IS NULL OR topics.deleted_at IS NULL` incorrectly included notifications for hard-deleted topics (where topics.id becomes NULL after the join).
2. **Inaccessible topics**: Count methods in the User model used raw SQL that only checked `deleted_at`, completely ignoring category permissions and PM access. Users who lost access to a private category or were removed from a PM still had those notifications counted.
3. **Scattered logic**: Notification visibility logic was scattered across 7+ methods with inconsistent filtering, making count vs. display mismatches inevitable.
## Solution
Introduces `NotificationQuery`, a centralized class that handles all notification visibility at the SQL level. This follows the same pattern as `BookmarkQuery` and ensures counts always match displayed notifications by filtering for:
- Hard-deleted topics (topic no longer exists)
- Soft-deleted topics (staff can still see these)
- Category permissions (user must have access)
- PM access (user must be allowed on the topic)
- Disabled badges (badge notifications for disabled badges are hidden)
## Changes
**New files:**
- `lib/notification_query.rb` - Centralized query class
- `spec/lib/notification_query_spec.rb` - Comprehensive tests
**Modified:**
- `app/models/user.rb` - Delegate count methods to NotificationQuery
- `app/models/notification.rb` - Remove scattered visibility logic
- `app/controllers/notifications_controller.rb` - Use NotificationQuery
- `app/controllers/users_controller.rb` - Use NotificationQuery for user menu messages
- `app/serializers/user_notification_total_serializer.rb` - Simplify query
- `lib/bookmark_query.rb` - Use NotificationQuery for bookmark reminder notifications
---
Redo of #27589.
Ref - t/121464
1 curtida