Skip to content

Commit

Permalink
server.chat.draft, changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
sdfsdhgjkbmnmxc committed Jun 14, 2021
1 parent 60b2070 commit c0b5346
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
v1.33
- experimental client.call.sdp / server.call.sdp events
- group wiki page removed
- draft_num replaced by gentime in server.chat.draft

v1.32
- features.calls deprecated. Use features.calls_version: (0 = disabled, 1 = audio only, 2 = audio+video)
- features.min_app_version deprecated. Use features.min_ios_version, features.min_android_version
11 changes: 7 additions & 4 deletions server_chat_draft.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package tdproto

func NewServerChatDraft(jid JID, draft string, draftNum int64) (r ServerChatDraft) {
func NewServerChatDraft(jid JID, draft string, gentime int64) (r ServerChatDraft) {
r.Name = r.GetName()
r.Params.Jid = jid
r.Params.Draft = draft
r.Params.DraftNum = draftNum
r.Params.Gentime = gentime
return r
}

// Changed draft message in chan
// Changed draft message in chat
type ServerChatDraft struct {
BaseEvent
Params serverChatDraftParams `json:"params"`
Expand All @@ -20,9 +20,12 @@ type serverChatDraftParams struct {
// Chat or contact id
Jid JID `json:"jid"`

// Draft version
Gentime int64 `json:"gentime" tdproto:"readonly"`

// Draft text
Draft string `json:"draft"`

// Draft version. TODO: use gentime instead
// Deprecated
DraftNum int64 `json:"draft_num"`
}

0 comments on commit c0b5346

Please sign in to comment.