Repository navigation
Conversation
setSubjects() replaced the event subject (e.g. label_assign) with the translated sentence. The activity app passes that subject to INotification::setSubject(), which rejects more than 64 characters, so the notifications for moving a card, adding a label, adding a description, marking as done and unarchiving were dropped with "Failed to format activity notification". The emails use the rich and parsed subjects since then, so the override is no longer needed. Fixes nextcloud#8591 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tiago Carrondo <tiago@carrondo.pt>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DeckProvider::setSubjects()ended with$event->setSubject($subject, $parameters), which replaced the stored identifier (e.g.label_assign) with the translated sentence. When an activity becomes a notification, the activity app'sNotificationGeneratorpasses$event->getSubject()toINotification::setSubject(). That rejects subjects longer than 64 characters, so the notification is logged as "Failed to format activity notification" and dropped.On an instance with Deck 1.19.1 and Nextcloud 35.0.2 (English), these subjects are over the limit and their notifications never reached the user:
label_assigncard_update_descriptioncard_update_donecard_update_stackIdcard_update_unarchiveThat came to 402 errors in 10 days for a single shared board. Translations are often longer, so more subjects can fail in other languages.
The override came in with e5fe19c (2018, "Fix missing information in activity emails"). Today the activity emails (
MailQueueHandler,DigestSender) and the API only use the rich and parsed subjects. In the activity app,getSubject()is only used when storing the event, before parsing, and in log messages. Within Deck,getIcon()and theparseParamFor*helpers read the identifier beforesetSubjects()runs.Checked on that instance by loading the patched
DeckProviderand running the activity app's own formatting for one activity of each type: the five subjects above now produce the notification, and the types that already worked are unchanged.The two
parsetests now also assert that the subject is still the identifier after parsing.TODO
Checklist
🤖 AI (if applicable)
🤖 Generated with Claude Code