/***************************************************************************
- * Copyright (C) 2005-2020 by the Quassel Project *
+ * Copyright (C) 2005-2022 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
last = oldestMessage;
}
- // only fetch additional messages if they continue seemlessly
+ // only fetch additional messages if they continue seamlessly
// that is, if the list of messages is not truncated by the limit
if (last == oldestMessage) {
msgList = Core::requestMsgs(coreSession()->user(), bufferId, -1, last, additional);
last = oldestMessage;
}
- // only fetch additional messages if they continue seemlessly
+ // only fetch additional messages if they continue seamlessly
// that is, if the list of messages is not truncated by the limit
if (last == oldestMessage) {
msgList = Core::requestMsgsFiltered(coreSession()->user(), bufferId, -1, last, additional, Message::Types{type}, Message::Flags{flags});
return backlog;
}
+QVariantList CoreBacklogManager::requestBacklogForward(BufferId bufferId, MsgId first, MsgId last, int limit, int type, int flags)
+{
+ QVariantList backlog;
+ auto msgList = Core::requestMsgsForward(coreSession()->user(), bufferId, first, last, limit, Message::Types{type}, Message::Flags{flags});
+
+ std::transform(msgList.cbegin(), msgList.cend(), std::back_inserter(backlog), [](auto&& msg) {
+ return QVariant::fromValue(msg);
+ });
+
+ return backlog;
+}
+
QVariantList CoreBacklogManager::requestBacklogAll(MsgId first, MsgId last, int limit, int additional)
{
QVariantList backlog;