summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/matterbridge/Rocket.Chat.Go.SDK/realtime/events.go
blob: f3c945cf46a3c6cd4ca3590c124d4818139e9a3d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package realtime

import "fmt"

func (c *Client) StartTyping(roomId string, username string) error {
	_, err := c.ddp.Call("stream-notify-room", fmt.Sprintf("%s/typing", roomId), username, true)
	if err != nil {
		return err
	}

	return nil
}

func (c *Client) StopTyping(roomId string, username string) error {
	_, err := c.ddp.Call("stream-notify-room", fmt.Sprintf("%s/typing", roomId), username, false)
	if err != nil {
		return err
	}

	return nil
}