aboutsummaryrefslogtreecommitdiff
path: root/ui/view-main.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2018-05-10 20:07:24 +0300
committerTulir Asokan <tulir@maunium.net>2018-05-10 20:07:24 +0300
commit1e6b5996491d7d27147a0dea2b52c36577820d63 (patch)
treec7f55b9a7a3797511254d0e55971ea535f1badf6 /ui/view-main.go
parent248db71c76988188f4021621837a8d024efa1d73 (diff)
Don't parse room ID
Diffstat (limited to 'ui/view-main.go')
-rw-r--r--ui/view-main.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/view-main.go b/ui/view-main.go
index ac7f3d2..c8b24f1 100644
--- a/ui/view-main.go
+++ b/ui/view-main.go
@@ -164,7 +164,12 @@ func (view *MainView) HandleCommand(roomView *RoomView, command string, args []s
roomView.AddServiceMessage("Usage: /join <room>")
break
}
- room, err := view.matrix.JoinRoom(args[0])
+ identifer := args[0]
+ server := ""
+ if len(args) > 1 {
+ server = args[1]
+ }
+ room, err := view.matrix.JoinRoom(identifer, server)
debug.Print("Join room error:", err)
if err == nil {
view.AddRoom(room)