File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -13,14 +13,14 @@ import (
1313)
1414
1515const  (
16- 	photoID  =  "AgACAgIAAxkDAAIBV16Ybpg7l2jPgMUiiLJ3WaQOUqTrAAJorjEbh2TBSPSOinaCHfydQO_pki4AAwEAAwIAA3kAA_NQAAIYBA " 
16+ 	photoURL  =  "https://telegra.ph/file/4e477a2abc5f53c0bb4aa.jpg " 
1717)
1818
1919var  (
2020	// required to test send and edit methods 
2121	token      =  os .Getenv ("TELEBOT_SECRET" )
2222	chatID , _  =  strconv .ParseInt (os .Getenv ("CHAT_ID" ), 10 , 64 )
23- 	userID , _  =  strconv .Atoi (os .Getenv ("USER_ID" ))
23+ 	userID , _  =  strconv .ParseInt (os .Getenv ("USER_ID" ),  10 ,  64 )
2424
2525	b , _  =  newTestBot ()      // cached bot instance to avoid getMe method flooding 
2626	to    =  & Chat {ID : chatID } // to chat recipient for send and edit methods 
@@ -313,7 +313,7 @@ func TestBot(t *testing.T) {
313313	assert .Equal (t , ErrBadRecipient , err )
314314
315315	photo  :=  & Photo {
316- 		File :    File {FileID :  photoID },
316+ 		File :    File {FileURL :  photoURL },
317317		Caption : t .Name (),
318318	}
319319	var  msg  * Message 
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import "strconv"
44
55// User object represents a Telegram user, bot. 
66type  User  struct  {
7- 	ID  int  `json:"id"` 
7+ 	ID  int64  `json:"id"` 
88
99	FirstName     string  `json:"first_name"` 
1010	LastName      string  `json:"last_name"` 
@@ -20,7 +20,7 @@ type User struct {
2020
2121// Recipient returns user ID (see Recipient interface). 
2222func  (u  * User ) Recipient () string  {
23- 	return  strconv .Itoa (u .ID )
23+ 	return  strconv .FormatInt (u .ID ,  10 )
2424}
2525
2626// Chat object represents a Telegram user, bot, group or a channel. 
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ type Contact struct {
184184
185185	// (Optional) 
186186	LastName  string  `json:"last_name"` 
187- 	UserID    int      `json:"user_id,omitempty"` 
187+ 	UserID    int64   `json:"user_id,omitempty"` 
188188}
189189
190190// Location object represents geographic position. 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments