aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/room.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/room.cpp b/lib/room.cpp
index 538c1562..14e60f51 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -326,7 +326,8 @@ const QString& Room::id() const
QString Room::version() const
{
- return d->getCurrentState<RoomCreateEvent>()->version();
+ const auto v = d->getCurrentState<RoomCreateEvent>()->version();
+ return v.isEmpty() ? "1" : v;
}
QString Room::predecessorId() const