aboutsummaryrefslogtreecommitdiff
path: root/telegram/commands.go
diff options
context:
space:
mode:
authorbodqhrohro <bodqhrohro@gmail.com>2019-12-10 21:49:42 +0300
committerbodqhrohro <bodqhrohro@gmail.com>2019-12-10 21:49:42 +0300
commit9e785a56d29f617a29afb941476c73f43bcdb3cc (patch)
tree5eb4443d4f0877ee978e273198ac8e674b97f731 /telegram/commands.go
parent416c70890950f76ce6f5ce902ea9a70165239f56 (diff)
lint
Diffstat (limited to 'telegram/commands.go')
-rw-r--r--telegram/commands.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/telegram/commands.go b/telegram/commands.go
index c41da29..678570f 100644
--- a/telegram/commands.go
+++ b/telegram/commands.go
@@ -133,7 +133,7 @@ func (c *Client) sendMessagesReverse(chatID int64, messages []*client.Message) {
}
}
-func (c *Client) usernameOrIdToId(username string) (int32, error) {
+func (c *Client) usernameOrIDToID(username string) (int32, error) {
userID, err := strconv.ParseInt(username, 10, 32)
// couldn't parse the id, try to lookup as a username
if err != nil {
@@ -481,7 +481,7 @@ func (c *Client) ProcessChatCommand(chatID int64, cmdline string) (string, bool)
}
if chatID < 0 {
- userID, err := c.usernameOrIdToId(args[0])
+ userID, err := c.usernameOrIDToID(args[0])
if err != nil {
return err.Error(), true
}
@@ -501,7 +501,7 @@ func (c *Client) ProcessChatCommand(chatID int64, cmdline string) (string, bool)
}
if chatID < 0 {
- userID, err := c.usernameOrIdToId(args[0])
+ userID, err := c.usernameOrIDToID(args[0])
if err != nil {
return err.Error(), true
}
@@ -522,7 +522,7 @@ func (c *Client) ProcessChatCommand(chatID int64, cmdline string) (string, bool)
}
if chatID < 0 {
- userID, err := c.usernameOrIdToId(args[0])
+ userID, err := c.usernameOrIDToID(args[0])
if err != nil {
return err.Error(), true
}