aboutsummaryrefslogtreecommitdiff
path: root/matrix
diff options
context:
space:
mode:
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