From 855f90e7ed29da4f282d0c4fc3be0797d40a86c9 Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Sun, 3 Jul 2016 17:28:46 +0100 Subject: Ignore empty m.room.name m.room.name can exist but be an empty string, in which case we should fallback to one of the other naming schemes. (#offtopic:matrix.org has this). Signed-off-by: Dr. David Alan Gilbert --- matrix-statetable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix-statetable.c b/matrix-statetable.c index 3d7edbe..8021645 100644 --- a/matrix-statetable.c +++ b/matrix-statetable.c @@ -129,7 +129,7 @@ gchar *matrix_statetable_get_room_alias(MatrixRoomStateEventTable *state_table) if(event != NULL) { tmpname = matrix_json_object_get_string_member( event->content, "name"); - if(tmpname != NULL) { + if(tmpname != NULL && tmpname[0] != '\0') { return g_strdup(tmpname); } } -- cgit