aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Matrix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/Matrix.cpp')
-rw-r--r--src/plugins/Matrix.cpp35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index 9ba1b6b..48d29eb 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -21,18 +21,6 @@ namespace QuickMedia {
}
- PluginResult Matrix::get_cached_sync(BodyItems &result_items) {
- /*
- Path sync_cache_path = get_cache_dir().join(name).join("sync.json");
- Json::Value root;
- if(!read_file_as_json(sync_cache_path, root))
- return PluginResult::ERR;
- return sync_response_to_body_items(root, result_items);
- */
- (void)result_items;
- return PluginResult::OK;
- }
-
PluginResult Matrix::sync(RoomSyncMessages &room_messages) {
std::vector<CommandArg> additional_args = {
{ "-H", "Authorization: Bearer " + access_token },
@@ -40,16 +28,6 @@ namespace QuickMedia {
};
std::string server_response;
- // timeout=30000, filter=0. First sync should be without filter and timeout=0, then all other sync should be with timeout=30000 and filter=0.
- // GET https://glowers.club/_matrix/client/r0/user/%40dec05eba%3Aglowers.club/filter/0 first to check if the filter is available
- // and if lazy load members is available and get limit to use with https://glowers.club/_matrix/client/r0/rooms/!oSXkiqBKooDcZsmiGO%3Aglowers.club/
- // when first launching the client. This call to /rooms/ should be called before /sync/, when accessing a room. But only the first time
- // (for the session).
-
- // Note: the first sync call with always exclude since= (next_batch) because we want to receive the latest messages in a room,
- // which is important if we for example login to matrix after having not been online for several days and there are many new messages.
- // We should be shown the latest messages first and if the user wants to see older messages then they should scroll up.
- // Note: missed mentions are received in /sync and they will remain in new /sync unless we send a read receipt that we have read them.
char url[512];
if(next_batch.empty())
@@ -84,19 +62,6 @@ namespace QuickMedia {
fprintf(stderr, "Matrix: missing next batch\n");
}
- // TODO: Only create the first time sync is called?
- /*
- Path sync_cache_path = get_cache_dir().join(name);
- if(create_directory_recursive(sync_cache_path) == 0) {
- sync_cache_path.join("sync.json");
- if(!save_json_to_file_atomic(sync_cache_path, json_root)) {
- fprintf(stderr, "Warning: failed to save sync response to %s\n", sync_cache_path.data.c_str());
- }
- } else {
- fprintf(stderr, "Warning: failed to create directory: %s\n", sync_cache_path.data.c_str());
- }
- */
-
return PluginResult::OK;
}