2021-03-25 15:15:22 +00:00
|
|
|
package requests
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
)
|
|
|
|
|
|
|
|
var ErrDeactivateChatInvalidID = errors.New("deactivate-chat: invalid id")
|
|
|
|
|
|
|
|
type DeactivateChat struct {
|
2023-12-11 12:29:56 +00:00
|
|
|
ID string `json:"id"`
|
|
|
|
PreserveHistory bool `json:"preserveHistory"`
|
2021-03-25 15:15:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (j *DeactivateChat) Validate() error {
|
|
|
|
if len(j.ID) == 0 {
|
|
|
|
return ErrDeactivateChatInvalidID
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|