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>
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
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