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

Rewrite expunge #2701

Closed
wants to merge 17 commits into from
Closed

Rewrite expunge #2701

wants to merge 17 commits into from

Conversation

rhari991
Copy link

This PR rewrites the expunge() method in ImapFolder to ensure that only messages that were marked with the \Deleted flag by K-9 Mail are expunged. This process is described in section 4.2.4 of RFC 4549


uidExpungeCommand.execute(connection, this);
} else {
UidSearchCommand searchCommand = new UidSearchCommand.Builder()
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this warrants its own method. also, a reference to the rfc would be nice, since this type of fallback method from a spec is not very common

Copy link
Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

Choose a reason for hiding this comment

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

...I don't think so, actually?

Copy link
Author

Choose a reason for hiding this comment

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

I have moved the UidSearchCommand and it's execution into a new method getUnknownDeletedUids() and have added a comment regarding the RFC at the top of the try block

Copy link
Contributor

Choose a reason for hiding this comment

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

oh, I see. I meant the whole thing in the else block, maybe something like expungeWithoutUidPlus?

Copy link
Author

Choose a reason for hiding this comment

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

Ah ok, done

@rhari991 rhari991 mentioned this pull request Nov 10, 2017
@rhari991
Copy link
Author

Rebased in #2927

@rhari991 rhari991 closed this Nov 10, 2017
@cketti cketti deleted the rewrite-imap-expunge branch January 28, 2023 18:10
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.

None yet

2 participants