Skip to content

DROID-3634 Notifications | Handle pushKeyUpdates and store #2379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

konstantiniiv
Copy link
Collaborator

@konstantiniiv konstantiniiv commented May 6, 2025


  • I understand that contributing to this repository will require me to agree with the CLA

Description

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📜 README.md
  • 📓 tech-docs
  • 🙅 no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

@konstantiniiv konstantiniiv self-assigned this May 6, 2025
@konstantiniiv konstantiniiv requested a review from uburoiubu as a code owner May 6, 2025 08:38
@konstantiniiv konstantiniiv requested a review from Copilot May 6, 2025 08:39
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements push key update handling for notifications by introducing a PushKeyProvider that stores push keys into shared preferences and a middleware channel to process events. It adds new tests to verify correct storage and update behavior and integrates these components via dependency injection.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
presentation/src/test/java/com/anytypeio/anytype/presentation/notifications/PushKeyProviderImplTest.kt Adds tests for PushKeyProvider behavior and shared preferences updates
presentation/src/main/java/com/anytypeio/anytype/presentation/notifications/PushKeyProviderImpl.kt Implements a provider that observes push key updates and stores them
middleware/src/test/java/com/anytypeio/anytype/middleware/interactor/PushKeyMiddlewareChannelTest.kt Provides tests to validate the middleware channel event processing
middleware/src/main/java/com/anytypeio/anytype/middleware/interactor/events/PushKeyMiddlewareChannel.kt Implements the middleware channel to collect push key updates from events
domain/src/main/java/com/anytypeio/anytype/domain/chats/PushKeyChannel.kt, data/src/main/java/com/anytypeio/anytype/data/auth/event/PushKeyRemoteChannel.kt, core-models/src/main/java/com/anytypeio/anytype/core_models/chats/PushKeyUpdate.kt, app/src/main/java/com/anytypeio/anytype/di/main/NotificationsModule.kt Introduces supporting interfaces, models, and DI bindings for push key update handling
Comments suppressed due to low confidence (1)

data/src/main/java/com/anytypeio/anytype/data/auth/event/PushKeyRemoteChannel.kt:13

  • [nitpick] The class name 'PushKeyDateChannel' appears inconsistent with its purpose; consider renaming it to 'PushKeyDataChannel' if it conveys that the channel manages push key data.
class PushKeyDateChannel(

@konstantiniiv konstantiniiv merged commit 1ef93d7 into main May 6, 2025
3 checks passed
@konstantiniiv konstantiniiv deleted the droid-3634-handle-push-encryption-key-updates-and-store-securely branch May 6, 2025 09:29
@github-actions github-actions bot locked and limited conversation to collaborators May 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants