added begin, end typing functions.
This commit is contained in:
parent
3b6caba1dd
commit
738bf5caf5
10
channel.go
10
channel.go
@ -220,3 +220,13 @@ func (c Channel) DeleteGroupRecipient(user_id string) error {
|
|||||||
_, err := c.Client.Request("DELETE", "/channels/"+c.Id+"/recipients/"+user_id, []byte{})
|
_, err := c.Client.Request("DELETE", "/channels/"+c.Id+"/recipients/"+user_id, []byte{})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Send a typing start event to the channel.
|
||||||
|
func (c *Channel) BeginTyping() {
|
||||||
|
c.Client.Socket.SendText(fmt.Sprintf("{\"type\":\"BeginTyping\",\"channel\":\"%s\"}", c.Id))
|
||||||
|
}
|
||||||
|
|
||||||
|
// End the typing event in the channel.
|
||||||
|
func (c *Channel) EndTyping() {
|
||||||
|
c.Client.Socket.SendText(fmt.Sprintf("{\"type\":\"EndTyping\",\"channel\":\"%s\"}", c.Id))
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user