diff options
Diffstat (limited to 'telegram')
-rw-r--r-- | telegram/connect.go | 4 | ||||
-rw-r--r-- | telegram/utils.go | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/telegram/connect.go b/telegram/connect.go index 6c88cd1..afa2d1f 100644 --- a/telegram/connect.go +++ b/telegram/connect.go @@ -68,10 +68,10 @@ func (stateHandler *clientAuthorizer) Handle(c *client.Client, state client.Auth return nil case client.TypeAuthorizationStateLoggingOut: - return client.ErrNotSupportedAuthorizationState + return nil case client.TypeAuthorizationStateClosing: - return client.ErrNotSupportedAuthorizationState + return nil case client.TypeAuthorizationStateClosed: return client.ErrNotSupportedAuthorizationState diff --git a/telegram/utils.go b/telegram/utils.go index f0316f2..3f15488 100644 --- a/telegram/utils.go +++ b/telegram/utils.go @@ -362,10 +362,10 @@ func (c *Client) getMessageReply(message *client.Message, preview bool, noConten if message.ReplyTo != nil && message.ReplyTo.MessageReplyToType() == client.TypeMessageReplyToMessage { replyTo, _ := message.ReplyTo.(*client.MessageReplyToMessage) var text string - if replyTo.Quote != nil && !noContent { + if replyTo.Quote != nil && replyTo.Quote.Text != nil && !noContent { text = formatter.Format( - replyTo.Quote.Text, - replyTo.Quote.Entities, + replyTo.Quote.Text.Text, + replyTo.Quote.Text.Entities, c.getFormatter(), ) // make the whole quote fit one line |