Skip to content

Commit

Permalink
- feat(tdapi): ParserSendArchiveStatusRequest renamed to ParserSendA…
Browse files Browse the repository at this point in the history
…rchiveStateRequest

 - fix(ParseStatus): set deprecated
  • Loading branch information
Victor Neznaykin committed Aug 5, 2022
1 parent 743627d commit de81e0a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 23 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v1.51.16
- feat(tdapi): ParserSendArchiveStatusRequest renamed to ParserSendArchiveStateRequest
- fix(ParseStatus): set deprecated

v1.51.15
- feat(contact): CanImportChats
- fix(features): ChatsImportEnabled removed
Expand Down
5 changes: 0 additions & 5 deletions codegen/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,6 @@ func ParseTdproto() (infoToFill *TdProto, err error) {
if err != nil {
return nil, err
}
// ParserSendArchiveStatusRequest
err = cherryPickStruct(tdModelsPackage, tdFormsPackage, "ParserSendArchiveStatusRequest")
if err != nil {
return nil, err
}
// ParserGetMappedUsersResponse
err = cherryPickStruct(tdModelsPackage, tdFormsPackage, "ParserGetMappedUsersResponse")
if err != nil {
Expand Down
15 changes: 0 additions & 15 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,6 @@ const (
MessengerTypeTelegram MessengerType = "telegram"
)

// ParseStatus parse status
type ParseStatus string

const (
ParseStatusCreated ParseStatus = "created" // archive just start for uploading
ParseStatusUploaded ParseStatus = "uploaded" // archive fully uploaded
ParseStatusInProgress ParseStatus = "in_progress" // parse in progress
ParseStatusUploadingMedia ParseStatus = "uploading_media" // uploading media in progress
ParseStatusCompleted ParseStatus = "completed" // parse and uploading media completed
ParseNotFound ParseStatus = "not_found" // archive not exists +
ParseStatusError ParseStatus = "error" // parse and uploading error
)

func (ct ParseStatus) String() string { return string(ct) }

// ParseState parse status
type ParseState string

Expand Down
6 changes: 3 additions & 3 deletions tdapi/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ type ParserGetStateResponse struct {
HasError bool `json:"has_error"`
}

// ParserSendArchiveStatusRequest ...
type ParserSendArchiveStatusRequest struct {
// ParserSendArchiveStateRequest ...
type ParserSendArchiveStateRequest struct {
// Status archive parse status
Status tdproto.ParseStatus `json:"status"`
Status tdproto.ParseState `json:"status"`

// Progress of archive unpacking
Progress uint16 `json:"progress"`
Expand Down

0 comments on commit de81e0a

Please sign in to comment.