beers: discard checkins with incomplete photos

This commit is contained in:
Chris Sexton 2018-01-19 14:20:22 -05:00
parent a20c323ac9
commit e5829899b0
1 changed files with 4 additions and 5 deletions

View File

@ -420,9 +420,11 @@ func (p *BeersPlugin) checkUntappd(channel string) {
msg, checkin.Checkin_comment) msg, checkin.Checkin_comment)
} }
msg2 := ""
if checkin.Media.Count > 0 { if checkin.Media.Count > 0 {
msg2 = "Here's a photo: " + checkin.Media.Items[0].Photo.Photo_img_lg if strings.Contains(checkin.Media.Items[0].Photo.Photo_img_lg, "photos-processing") {
continue
}
msg += "\nHere's a photo: " + checkin.Media.Items[0].Photo.Photo_img_lg
} }
user.lastCheckin = checkin.Checkin_id user.lastCheckin = checkin.Checkin_id
@ -435,9 +437,6 @@ func (p *BeersPlugin) checkUntappd(channel string) {
log.Println("checkin id:", checkin.Checkin_id, "Message:", msg) log.Println("checkin id:", checkin.Checkin_id, "Message:", msg)
p.Bot.SendMessage(channel, msg) p.Bot.SendMessage(channel, msg)
if msg2 != "" {
p.Bot.SendMessage(channel, msg2)
}
} }
} }