Skip to content

Commit

Permalink
Added the "expire_ttl" and "is_expired" fields for a long-poll user.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alnezis authored and SevereCloud committed Jul 14, 2020
1 parent 774fc10 commit 9b43449
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions longpoll-user/v3/extra.go
Expand Up @@ -73,6 +73,8 @@ type AdditionalData struct {
Title string // Message's subject.
RefSource string
From string // User ID of who sent the message if the message is from a chat
ExpireTTL string
IsExpired string
// FromAdmin ID of the administrator who sent the message. It is returned for
// messages sent from a community (only for community administrators).
FromAdmin string
Expand All @@ -97,6 +99,14 @@ func (result *AdditionalData) parse(v map[string]interface{}) {
result.FromAdmin = fromAdmin
}

if expireTTL, ok := v["expire_ttl"].(string); ok {
result.ExpireTTL = expireTTL
}

if isExpired, ok := v["is_expired"].(string); ok {
result.IsExpired = isExpired
}

if emoji, ok := v["emoji"].(string); ok {
result.Emoji = emoji
}
Expand Down

0 comments on commit 9b43449

Please sign in to comment.