// setMsn(resultMsn);
// Check if this fetch will cause the "SEEN" flag to be set on this
// message. If so, update the flags, and ensure that a flags response is
// included in the response.
final MailboxSession mailboxSession = ImapSessionUtils.getMailboxSession(session);
boolean ensureFlagsResponse = false;
final Flags resultFlags = result.getFlags();
if (fetch.isSetSeen() && !resultFlags.contains(Flags.Flag.SEEN)) {
mailbox.setFlags(new Flags(Flags.Flag.SEEN), true, false, MessageRange.one(resultUid), mailboxSession);
resultFlags.add(Flags.Flag.SEEN);