mirror of https://github.com/djcb/mu.git
server: add some more logging for read-marking
See what happens with multiple messages.
This commit is contained in:
parent
d89820b26b
commit
3d3fd1aa7a
|
@ -1047,12 +1047,17 @@ Server::Private::maybe_mark_as_read(Store::Id docid, Flags oldflags, bool rename
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Server::Private::maybe_mark_msgid_as_read(const std::string& msgid,
|
Server::Private::maybe_mark_msgid_as_read(const std::string& msgid, bool rename) try {
|
||||||
bool rename) try {
|
|
||||||
if (!msgid.empty())
|
if (!msgid.empty())
|
||||||
return false; // nothing to do.
|
return false; // nothing to do.
|
||||||
|
|
||||||
for (auto&& docid: docids_for_msgid(store_, msgid))
|
const auto docids = docids_for_msgid(store_, msgid);
|
||||||
|
if (!docids.empty())
|
||||||
|
g_debug("marking %zu messages with message-id '%s' as read",
|
||||||
|
docids.size(), msgid.c_str());
|
||||||
|
|
||||||
|
for (auto&& docid: docids)
|
||||||
if (auto msg{store().find_message(docid)}; msg)
|
if (auto msg{store().find_message(docid)}; msg)
|
||||||
maybe_mark_as_read(docid, msg->flags(), rename);
|
maybe_mark_as_read(docid, msg->flags(), rename);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue