Skip to content

Feature subscriptions#4

Merged
pavelrk97 merged 8 commits into
mainfrom
feature_subscriptions
Sep 18, 2025
Merged

Feature subscriptions#4
pavelrk97 merged 8 commits into
mainfrom
feature_subscriptions

Conversation

@pavelrk97

Copy link
Copy Markdown
Owner

No description provided.


Optional<Subscription> subscription = subscriptionRepository
.findByFollowerAndOwner(follower, owner);
if (subscription.isEmpty()) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Обычно ifEmpty используется

}
Optional<Subscription> reverseSubscription = subscriptionRepository
.findByFollowerAndOwner(owner, follower);
if (reverseSubscription.isPresent() &&

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Здесь тоже лучше ifPresent

@pavelrk97 pavelrk97 merged commit 322d840 into main Sep 18, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants