aboutsummaryrefslogtreecommitdiff
path: root/matrix
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 /matrix
parent248db71c76988188f4021621837a8d024efa1d73 (diff)
Don't parse room ID
Diffstat (limited to 'matrix')
-rw-r--r--matrix/matrix.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/matrix/matrix.go b/matrix/matrix.go
index 4609876..de65b60 100644
--- a/matrix/matrix.go
+++ b/matrix/matrix.go
@@ -438,16 +438,11 @@ func (c *Container) SendTyping(roomID string, typing bool) {
}
// JoinRoom makes the current user try to join the given room.
-func (c *Container) JoinRoom(roomID string) (*rooms.Room, error) {
+func (c *Container) JoinRoom(roomID, server string) (*rooms.Room, error) {
if len(roomID) == 0 {
return nil, fmt.Errorf("invalid room ID")
}
- server := ""
- if roomID[0] == '!' {
- server = roomID[strings.Index(roomID, ":")+1:]
- }
-
resp, err := c.client.JoinRoom(roomID, server, nil)
if err != nil {
return nil, err