Skip to content
Snippets Groups Projects
Unverified Commit 41314809 authored by Joe Donofry's avatar Joe Donofry Committed by GitHub
Browse files

Merge pull request #10 from MonokelPinguin/master

Workaround synapse bug #4898 Thanks @MonokelPinguin 
parents 5422d281 765bf876
No related branches found
No related tags found
No related merge requests found
...@@ -68,8 +68,17 @@ from_json(const json &obj, Ephemeral &ephemeral) ...@@ -68,8 +68,17 @@ from_json(const json &obj, Ephemeral &ephemeral)
auto event_id = it.key(); auto event_id = it.key();
auto users = it.value().at("m.read"); auto users = it.value().at("m.read");
for (auto uit = users.begin(); uit != users.end(); ++uit) for (auto uit = users.begin(); uit != users.end(); ++uit) {
user_times.emplace(uit.key(), uit.value().at("ts")); uint64_t ts = 0;
try {
ts = uit.value().at("ts");
} catch (json::type_error &) {
std::cerr
<< "mtxclient: Workaround synapse bug #4898, "
"ignoring timestamp for m.receipt event\n";
}
user_times.emplace(uit.key(), ts);
}
receipts.emplace(event_id, user_times); receipts.emplace(event_id, user_times);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment