Skip to content

[stable-25.0.x] fix(notifications): abort NotificationWorker when user init fails - #6580

Merged
mahibi merged 2 commits into
stable-25.0.xfrom
backport/6578/stable-25.0.x
Aug 26, 2026
Merged

[stable-25.0.x] fix(notifications): abort NotificationWorker when user init fails#6580
mahibi merged 2 commits into
stable-25.0.xfrom
backport/6578/stable-25.0.x

Conversation

@backportbot

@backportbot backportbot Bot commented Aug 25, 2026

Copy link
Copy Markdown

Backport of PR #6578

@backportbot
backportbot Bot requested review from mahibi and rapterjet2004 August 25, 2026 17:25
@backportbot backportbot Bot added 3. to review Waiting for reviews AI assisted labels Aug 25, 2026
@backportbot backportbot Bot added this to the 25.0.0 milestone Aug 25, 2026
@AndyScherzinger
AndyScherzinger force-pushed the backport/6578/stable-25.0.x branch from 312437b to a0fc97a Compare August 25, 2026 17:39
@github-actions

Copy link
Copy Markdown
Contributor

APK file: https://github.com/nextcloud/talk-android/actions/runs/32879208755/artifacts/9575714145
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

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>
mahibi and others added 2 commits August 26, 2026 08:56
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
AndyScherzinger force-pushed the backport/6578/stable-25.0.x branch from 4cb4379 to d23f9d7 Compare August 26, 2026 06:56
@github-actions

Copy link
Copy Markdown
Contributor

APK file: https://github.com/nextcloud/talk-android/actions/runs/32940368522/artifacts/9597629942
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@mahibi
mahibi merged commit 9fef8f0 into stable-25.0.x Aug 26, 2026
13 of 17 checks passed
@mahibi
mahibi deleted the backport/6578/stable-25.0.x branch August 26, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants