Skip to content

Commit

Permalink
client.GetHistory added type MessagesChannelMessages #128
Browse files Browse the repository at this point in the history
  • Loading branch information
AmarnathCJD committed Aug 4, 2024
1 parent 76b5100 commit e4cedc0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions telegram/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,13 @@ func (c *Client) GetHistory(PeerID interface{}, opts ...*HistoryOption) ([]NewMe
for _, msg := range req.Messages {
messages = append(messages, *packMessage(c, msg))
}
case *MessagesChannelMessages:
c.Cache.UpdatePeersToCache(req.Users, req.Chats)
for _, msg := range req.Messages {
messages = append(messages, *packMessage(c, msg))
}
case *MessagesMessagesNotModified:
return nil, errors.New("messages not modified")
}

return messages, nil
Expand Down

0 comments on commit e4cedc0

Please sign in to comment.