[stable-25.0.x] fix(notifications): abort NotificationWorker when user init fails - #6580
Merged
Conversation
AndyScherzinger
approved these changes
Aug 25, 2026
AndyScherzinger
force-pushed
the
backport/6578/stable-25.0.x
branch
from
August 25, 2026 17:39
312437b to
a0fc97a
Compare
Contributor
|
APK file: https://github.com/nextcloud/talk-android/actions/runs/32879208755/artifacts/9575714145 |
AndyScherzinger
added a commit
that referenced
this pull request
Aug 26, 2026
BaseActivity imported MainActivity from its own package, which detekt flagged as NoUnusedImports. Dropping it takes stable-25.0.x from 110 to 109 issues, back under the maxIssues limit. The NotificationWorker half of #6583 is deliberately left out: the Boolean-returning initDecryptedData() it refactors only arrives with #6580, so there is no ReturnCount finding to fix here yet. Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
initDecryptedData() could silently leave `user` uninitialized (invalid signature, or an exception swallowed by the catch block), after which doWork() unconditionally called initNcApiAndCredentials(), crashing with UninitializedPropertyAccessException and dropping the notification. Now initDecryptedData() reports success/failure and doWork() bails out early with a log when it fails. Assisted-by: Claude Code:claude-sonnet-5 Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Returning Boolean from initDecryptedData() gave it a third return statement, which detekt flags as ReturnCount. Split the cleartext and encrypted subject paths into their own helpers so each has a single exit. The complexity the early bail-out adds to doWork() is left as is, since master carries that same finding. Once the import removal from #6584 is in, the score lands at exactly 110. Assisted-by: Claude Code:claude-opus-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
AndyScherzinger
force-pushed
the
backport/6578/stable-25.0.x
branch
from
August 26, 2026 06:56
4cb4379 to
d23f9d7
Compare
Contributor
|
APK file: https://github.com/nextcloud/talk-android/actions/runs/32940368522/artifacts/9597629942 |
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.
Backport of PR #6578