aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Matrix.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-12-05 06:09:05 +0100
committerdec05eba <dec05eba@protonmail.com>2020-12-05 06:09:05 +0100
commita8e35756f9e2b2a94d76c88e699692aef05555a9 (patch)
treedc9c41210aa39a63a6dd77238c89526cb6754f86 /src/plugins/Matrix.cpp
parent3a501ffbe0cd705eed09e697e22023754558aa89 (diff)
Matrix: scroll to bottom when receiving previous messages and no visible messages, fix thumbnail size json crash
Diffstat (limited to 'src/plugins/Matrix.cpp')
-rw-r--r--src/plugins/Matrix.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index a7d50d0..f8a88b1 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -1401,7 +1401,7 @@ namespace QuickMedia {
const rapidjson::Value &unread_notification_json = GetMember(it.value, "unread_notifications");
if(unread_notification_json.IsObject() && !is_additional_messages_sync) {
const rapidjson::Value &highlight_count_json = GetMember(unread_notification_json, "highlight_count");
- if(highlight_count_json.IsNumber() && (highlight_count_json.GetInt64() > 0 || initial_sync)) {
+ if(highlight_count_json.IsInt64() && (highlight_count_json.GetInt64() > 0 || initial_sync)) {
room->unread_notification_count = highlight_count_json.GetInt64();
if(highlight_count_json.GetInt64() > 0)
has_unread_notifications = true;
@@ -1588,7 +1588,7 @@ namespace QuickMedia {
bool found_resolution = false;
const rapidjson::Value &w_json = GetMember(info_json, "w");
const rapidjson::Value &h_json = GetMember(info_json, "h");
- if(w_json.IsNumber() && h_json.IsNumber()) {
+ if(w_json.IsInt() && h_json.IsInt()) {
thumbnail_size.x = w_json.GetInt();
thumbnail_size.y = h_json.GetInt();
found_resolution = true;
@@ -1598,7 +1598,7 @@ namespace QuickMedia {
if(thumbnail_info_json.IsObject()) {
const rapidjson::Value &w_json = GetMember(thumbnail_info_json, "w");
const rapidjson::Value &h_json = GetMember(thumbnail_info_json, "h");
- if(w_json.IsNumber() && h_json.IsNumber()) {
+ if(w_json.IsInt() && h_json.IsInt()) {
thumbnail_size.x = w_json.GetInt();
thumbnail_size.y = h_json.GetInt();
found_resolution = true;
@@ -1762,7 +1762,7 @@ namespace QuickMedia {
time_t timestamp = 0;
const rapidjson::Value &origin_server_ts = GetMember(event_item_json, "origin_server_ts");
- if(origin_server_ts.IsNumber())
+ if(origin_server_ts.IsInt64())
timestamp = origin_server_ts.GetInt64();
const rapidjson::Value &type_json = GetMember(event_item_json, "type");
@@ -2236,7 +2236,7 @@ namespace QuickMedia {
continue;
const rapidjson::Value &timestamp_json = GetMember(event_json, "origin_server_ts");
- if(!timestamp_json.IsNumber())
+ if(!timestamp_json.IsInt64())
continue;
const rapidjson::Value &membership_json = GetMember(content_json, "membership");
@@ -3391,7 +3391,7 @@ namespace QuickMedia {
return PluginResult::ERR;
const rapidjson::Value &upload_size_json = GetMember(json_root, "m.upload.size");
- if(!upload_size_json.IsNumber())
+ if(!upload_size_json.IsInt())
return PluginResult::ERR;
upload_limit = upload_size_json.GetInt();