From e7d6aafd3c9353d9e6169ca775cf1dae618238cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 17 Jun 2023 21:58:32 +0200 Subject: Storage: iterable type for record item list --- src/message.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/message.cpp') diff --git a/src/message.cpp b/src/message.cpp index ff8e05b..06ee8ad 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -55,15 +55,10 @@ DirectMessageData DirectMessageData::load(const Ref & ref) if (!rec) return DirectMessageData(); - vector> prev; - for (auto p : rec->items("PREV")) - if (const auto & x = p.as()) - prev.push_back(*x); - auto fref = rec->item("from").asRef(); return DirectMessageData { - .prev = std::move(prev), + .prev = rec->items("PREV").as(), .from = fref ? Identity::load(*fref) : nullopt, .time = *rec->item("time").asDate(), .text = rec->item("text").asText().value(), -- cgit v1.2.3