|
|
|
@ -63,6 +63,7 @@ type Chat struct {
|
|
|
|
|
NoVoiceAndVideo bool `json:"has_restricted_voice_and_video_messages"`
|
|
|
|
|
HiddenMembers bool `json:"has_hidden_members,omitempty"`
|
|
|
|
|
AggressiveAntiSpam bool `json:"has_aggressive_anti_spam_enabled,omitempty"`
|
|
|
|
|
EmojiExpirationUnixtime int64 `json:"emoji_status_expiration_date"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Recipient returns chat ID (see Recipient interface).
|
|
|
|
@ -243,6 +244,14 @@ type ChatInviteLink struct {
|
|
|
|
|
PendingCount int `json:"pending_join_request_count"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Story struct {
|
|
|
|
|
// Unique identifier for the story in the chat
|
|
|
|
|
ID int `json:"id"`
|
|
|
|
|
|
|
|
|
|
// Chat that posted the story
|
|
|
|
|
Poster *Chat `json:"chat"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ExpireDate returns the moment of the link expiration in local time.
|
|
|
|
|
func (c *ChatInviteLink) ExpireDate() time.Time {
|
|
|
|
|
return time.Unix(c.ExpireUnixtime, 0)
|
|
|
|
@ -253,6 +262,11 @@ func (r ChatJoinRequest) Time() time.Time {
|
|
|
|
|
return time.Unix(r.Unixtime, 0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Time returns the moment of the emoji status expiration.
|
|
|
|
|
func (c *Chat) Time() time.Time {
|
|
|
|
|
return time.Unix(c.EmojiExpirationUnixtime, 0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// InviteLink should be used to export chat's invite link.
|
|
|
|
|
func (b *Bot) InviteLink(chat *Chat) (string, error) {
|
|
|
|
|
params := map[string]string{
|
|
|
|
|