github.com/tada-team/tdproto@v1.51.57/server_chat_draft.go (about)

     1  package tdproto
     2  
     3  func NewServerChatDraft(jid JID, draft string, gentime int64, revision int64) (r ServerChatDraft) {
     4  	r.Name = r.GetName()
     5  	r.Params.Jid = jid
     6  	r.Params.Draft = draft
     7  	r.Params.DraftGentime = gentime
     8  	r.Params.Revision = revision
     9  	return r
    10  }
    11  
    12  // Changed draft message in chat
    13  type ServerChatDraft struct {
    14  	BaseEvent
    15  	Params serverChatDraftParams `json:"params"`
    16  }
    17  
    18  func (p ServerChatDraft) GetName() string { return "server.chat.draft" }
    19  
    20  // Params of the server.chat.draft event
    21  type serverChatDraftParams struct {
    22  	// Chat or contact id
    23  	Jid JID `json:"jid"`
    24  
    25  	// Draft text
    26  	Draft string `json:"draft"`
    27  
    28  	// Draft version
    29  	// Deprecated: use Revision instead
    30  	DraftGentime int64 `json:"draft_gentime"`
    31  
    32  	// Revision Unixtime(ms)
    33  	Revision int64 `json:"revision"`
    34  
    35  	// Deprecated: use Revision instead
    36  	DraftNum int64 `json:"draft_num"`
    37  }