Skip to content
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

Comments: Add method to fetch the latest reply comment ID #17408

Merged
merged 6 commits into from
Nov 3, 2021

Conversation

dvdchr
Copy link
Contributor

@dvdchr dvdchr commented Nov 2, 2021

Refs #17087
Depends on #17399, wordpress-mobile/WordPressKit-iOS#463

As titled, this PR extends Comment Service so it could fetch the latest reply ID from a specified comment ID. In the method parameters, I've added accountService to make it testable. As for the AccountService usage, the method needs to fetch the current user's dotcom ID to filter returned comments.

To test

Since there are no visual changes, make sure all the tests pass.

Regression Notes

  1. Potential unintended areas of impact
    n/a. Feature is unreleased.

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    n/a. Feature is unreleased.

  3. What automated tests I added (or what prevented me from doing so)
    Added unit tests for the CommentService.

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Nov 2, 2021

You can trigger an installable build for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Nov 2, 2021

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

Copy link
Contributor

@ScoutHarris ScoutHarris left a comment

Choose a reason for hiding this comment

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

:shipit:

WordPress/Classes/Services/CommentService+Replies.swift Outdated Show resolved Hide resolved
///
extension CommentService {
/// Fetches the current user's latest reply ID for the specified `commentID`.
/// In case if there are no replies found, the success block will still be called with value 0.
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Base automatically changed from issue/17087-comments-add-reply-id to develop November 3, 2021 06:23
@dvdchr dvdchr enabled auto-merge November 3, 2021 06:51
@dvdchr dvdchr merged commit f02875c into develop Nov 3, 2021
@dvdchr dvdchr deleted the issue/17087-comments-service-latest-reply-id branch November 3, 2021 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants