fix v2
This commit is contained in:
		
							parent
							
								
									d52bd7d692
								
							
						
					
					
						commit
						18a3295e50
					
				
					 1 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
					@ -20,9 +20,9 @@ func GetGP(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
 | 
				
			||||||
		log.Println("[gaypoints] Looking for gaypoints for user " + strconv.FormatInt(update.Message.ReplyToMessage.From.ID, 10) + " in chat " + strconv.FormatInt(update.Message.Chat.ID, 10))
 | 
							log.Println("[gaypoints] Looking for gaypoints for user " + strconv.FormatInt(update.Message.ReplyToMessage.From.ID, 10) + " in chat " + strconv.FormatInt(update.Message.Chat.ID, 10))
 | 
				
			||||||
		points := sqlGetGP(update.Message.Chat.ID, update.Message.ReplyToMessage.From.ID)
 | 
							points := sqlGetGP(update.Message.Chat.ID, update.Message.ReplyToMessage.From.ID)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		gotUser, currentUser := botIO.GetUserByID(tgbotapi.ChatConfigWithUser{ChatID: update.Message.Chat.ID, UserID: update.Message.ReplyToMessage.From.ID}, bot)
 | 
							errorGettingUser, currentUser := botIO.GetUserByID(tgbotapi.ChatConfigWithUser{ChatID: update.Message.Chat.ID, UserID: update.Message.ReplyToMessage.From.ID}, bot)
 | 
				
			||||||
		var messagetext string
 | 
							var messagetext string
 | 
				
			||||||
		if !gotUser {
 | 
							if !errorGettingUser {
 | 
				
			||||||
			currentName := currentUser.User.FirstName
 | 
								currentName := currentUser.User.FirstName
 | 
				
			||||||
			if currentUser.User.UserName != "" {
 | 
								if currentUser.User.UserName != "" {
 | 
				
			||||||
				currentName = currentUser.User.UserName
 | 
									currentName = currentUser.User.UserName
 | 
				
			||||||
| 
						 | 
					@ -49,8 +49,8 @@ func GetGP(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	var messagetext string
 | 
						var messagetext string
 | 
				
			||||||
	for _, gaypointInfo := range gps {
 | 
						for _, gaypointInfo := range gps {
 | 
				
			||||||
		gotUser, currentUser := botIO.GetUserByID(tgbotapi.ChatConfigWithUser{ChatID: update.Message.Chat.ID, UserID: gaypointInfo.userID}, bot)
 | 
							errorGettingUser, currentUser := botIO.GetUserByID(tgbotapi.ChatConfigWithUser{ChatID: update.Message.Chat.ID, UserID: gaypointInfo.userID}, bot)
 | 
				
			||||||
		if !gotUser {
 | 
							if errorGettingUser {
 | 
				
			||||||
			continue
 | 
								continue
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		currentName := currentUser.User.FirstName
 | 
							currentName := currentUser.User.FirstName
 | 
				
			||||||
| 
						 | 
					@ -166,10 +166,10 @@ func SetGP(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	gotUser, currentUser := botIO.GetUserByID(tgbotapi.ChatConfigWithUser{ChatID: update.Message.Chat.ID, UserID: update.Message.ReplyToMessage.From.ID}, bot)
 | 
						errorGettingUser, currentUser := botIO.GetUserByID(tgbotapi.ChatConfigWithUser{ChatID: update.Message.Chat.ID, UserID: update.Message.ReplyToMessage.From.ID}, bot)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	var messagetext string
 | 
						var messagetext string
 | 
				
			||||||
	if gotUser {
 | 
						if !errorGettingUser {
 | 
				
			||||||
		currentName := currentUser.User.FirstName
 | 
							currentName := currentUser.User.FirstName
 | 
				
			||||||
		if currentUser.User.UserName != "" {
 | 
							if currentUser.User.UserName != "" {
 | 
				
			||||||
			currentName = currentUser.User.UserName
 | 
								currentName = currentUser.User.UserName
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue