From 67d39691666bcdf3cc660db19ccc0d9941df13fd Mon Sep 17 00:00:00 2001
From: redsky17 <joedonofry@gmail.com>
Date: Fri, 22 Feb 2019 03:24:14 +0000
Subject: [PATCH] Fix Room v3 Issue

This at least partially addresses #3.  I have a feeling that
additional updates will be needed at some point, but this
fixes the issue where mtxclient would throw an exception for
unrecognized event id formats, which caused nheko to crash.
---
 include/mtx/identifiers.hpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/mtx/identifiers.hpp b/include/mtx/identifiers.hpp
index 87acc4360..78858851d 100644
--- a/include/mtx/identifiers.hpp
+++ b/include/mtx/identifiers.hpp
@@ -90,7 +90,10 @@ parse(const std::string &id)
                 identifier.hostname_  = id.substr(parts + 1);
                 identifier.id_        = id;
         } else {
-                throw std::invalid_argument(id + ": invalid format\n");
+                // V3 event ids don't use ':' at all, don't parse them the same way.
+                identifier.localpart_ = id;
+                identifier.hostname_ = id;
+                identifier.id_ = id;
         }
 
         return identifier;
-- 
GitLab