Skip to content

Commit a71c8ad

Browse files
authored
Merge pull request #35 from Pamplemousse/master
room: fix `to_s`
2 parents fa25f7a + 6e7e539 commit a71c8ad

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

lib/matrix_sdk/room.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,8 @@ def to_space
113113
end
114114

115115
def to_s
116-
prefix = canonical_alias if canonical_alias_has_value?
117-
prefix ||= id
118-
return "#{prefix} | #{name}" if name_has_value?
116+
prefix = canonical_alias || id
117+
return "#{prefix} | #{name}" unless name.nil?
119118

120119
prefix
121120
end

0 commit comments

Comments
 (0)