summary refs log tree commit diff
path: root/src/Cache.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-07-29 04:04:44 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2022-07-29 04:04:44 +0200
commit3c480d47f1510a0a813756735710bbbb8a2ad400 (patch)
tree229b315ffa9d805e903d2c0a8e6a48d0c1b1ff25 /src/Cache.cpp
parentTranslated using Weblate (Polish) (diff)
downloadnheko-3c480d47f1510a0a813756735710bbbb8a2ad400.tar.xz
Make code compile with hidden friends
Diffstat (limited to 'src/Cache.cpp')
-rw-r--r--src/Cache.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Cache.cpp b/src/Cache.cpp
index c740cc55..c2c59066 100644
--- a/src/Cache.cpp
+++ b/src/Cache.cpp
@@ -1207,7 +1207,7 @@ Cache::runMigrations()
                                    break;
 
                                mtx::events::collections::TimelineEvent te;
-                               mtx::events::collections::from_json(j["event"], te);
+                               from_json(j["event"], te);
                                oldMessages.events.push_back(te.data);
                            }
                            // messages were stored in reverse order, so we
@@ -2201,7 +2201,7 @@ Cache::getTimelineMessages(lmdb::txn &txn, const std::string &room_id, uint64_t
 
         mtx::events::collections::TimelineEvent te;
         try {
-            mtx::events::collections::from_json(nlohmann::json::parse(event), te);
+            from_json(nlohmann::json::parse(event), te);
         } catch (std::exception &e) {
             nhlog::db()->error("Failed to parse message from cache {}", e.what());
             continue;
@@ -2231,7 +2231,7 @@ Cache::getEvent(const std::string &room_id, const std::string &event_id)
 
     mtx::events::collections::TimelineEvent te;
     try {
-        mtx::events::collections::from_json(nlohmann::json::parse(event), te);
+        from_json(nlohmann::json::parse(event), te);
     } catch (std::exception &e) {
         nhlog::db()->error("Failed to parse message from cache {}", e.what());
         return std::nullopt;
@@ -3177,7 +3177,7 @@ Cache::firstPendingMessage(const std::string &room_id)
 
             try {
                 mtx::events::collections::TimelineEvent te;
-                mtx::events::collections::from_json(nlohmann::json::parse(event), te);
+                from_json(nlohmann::json::parse(event), te);
 
                 pendingCursor.close();
                 txn.commit();
@@ -3316,8 +3316,8 @@ Cache::saveTimelineMessages(lmdb::txn &txn,
 
             mtx::events::collections::TimelineEvent te;
             try {
-                mtx::events::collections::from_json(
-                  nlohmann::json::parse(std::string_view(oldEvent.data(), oldEvent.size())), te);
+                from_json(nlohmann::json::parse(std::string_view(oldEvent.data(), oldEvent.size())),
+                          te);
                 // overwrite the content and add redation data
                 std::visit(
                   [redaction](auto &ev) {
@@ -3578,7 +3578,7 @@ Cache::getTimelineMentionsForRoom(lmdb::txn &txn, const std::string &room_id)
             continue;
 
         mtx::responses::Notification notification;
-        mtx::responses::from_json(obj, notification);
+        from_json(obj, notification);
 
         notif.notifications.push_back(notification);
     }