diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-07-21 14:45:44 +0300 |
---|---|---|
committer | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-07-21 14:45:44 +0300 |
commit | eadef987be11dc22a89c2aad990814bd89add770 (patch) | |
tree | d7ca50fd61e8aecd81049667dd871acc9c874f7b /telegram/utils.go | |
parent | 563cb2d624598efdd3819daef00c64079d8a20e1 (diff) |
Revert "Avoid webpage preview updates being sent as message edits"
This reverts commit 563cb2d624598efdd3819daef00c64079d8a20e1.
Diffstat (limited to 'telegram/utils.go')
-rw-r--r-- | telegram/utils.go | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/telegram/utils.go b/telegram/utils.go index da66189..9486349 100644 --- a/telegram/utils.go +++ b/telegram/utils.go @@ -24,7 +24,6 @@ import ( "github.com/zelenin/go-tdlib/client" ) -// VCardInfo contains intermediate data to produce a vCard type VCardInfo struct { Fn string Photo *client.File @@ -35,12 +34,6 @@ type VCardInfo struct { Info string } -// ChatMessageId uniquely identifies a Telegram message -type ChatMessageId struct { - ChatId int64 - MessageId int64 -} - var errOffline = errors.New("TDlib instance is offline") var spaceRegex = regexp.MustCompile(`\s+`) @@ -1391,29 +1384,3 @@ func (c *Client) getCarbonFullJids(isOutgoing bool, ignoredResource string) []st } return jids } - -func (c *Client) addToEditQueue(chatId, messageId int64) { - c.locks.editQueueLock.Lock() - defer c.locks.editQueueLock.Unlock() - - c.editQueue[ChatMessageId{ - ChatId: chatId, - MessageId: messageId, - }] = true -} - -func (c *Client) deleteFromEditQueue(chatId, messageId int64) bool { - c.locks.editQueueLock.Lock() - defer c.locks.editQueueLock.Unlock() - - key := ChatMessageId{ - ChatId: chatId, - MessageId: messageId, - } - _, ok := c.editQueue[key] - if ok { - delete(c.editQueue, key) - } - - return ok -} |