github.com/tada-team/tdproto@v1.51.57/client_chat_composing.go (about) 1 package tdproto 2 3 func NewClientChatComposing(jid JID, composing bool, draft *string) (r ClientChatComposing) { 4 r.Name = r.GetName() 5 r.Params.Jid = jid 6 r.Params.Composing = composing 7 r.Params.Draft = draft 8 return r 9 } 10 11 // Typing or recording audiomessage 12 type ClientChatComposing struct { 13 BaseEvent 14 Params clientChatComposingParams `json:"params"` 15 } 16 17 func (p ClientChatComposing) GetName() string { return "client.chat.composing" } 18 19 // Params of the client.chat.composing event 20 type clientChatComposingParams struct { 21 // Chat or contact id 22 Jid JID `json:"jid"` 23 24 // true = audiomessage, false = text typing 25 IsAudio bool `json:"is_audio,omitempty"` 26 27 // true = start typing / audio recording, false = stop 28 Composing bool `json:"composing,omitempty"` 29 30 // Message draft data 31 // Deprecated 32 Draft *string `json:"draft,omitempty"` 33 }