summaryrefslogtreecommitdiff
path: root/src/message.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/message.cpp')
-rw-r--r--src/message.cpp7
1 files changed, 1 insertions, 6 deletions
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<Stored<DirectMessageData>> prev;
- for (auto p : rec->items("PREV"))
- if (const auto & x = p.as<DirectMessageData>())
- prev.push_back(*x);
-
auto fref = rec->item("from").asRef();
return DirectMessageData {
- .prev = std::move(prev),
+ .prev = rec->items("PREV").as<DirectMessageData>(),
.from = fref ? Identity::load(*fref) : nullopt,
.time = *rec->item("time").asDate(),
.text = rec->item("text").asText().value(),