liddiard / slack-meetups

Slack bot that randomly pairs users in a Slack channel for 1:1 meetups. Meet new, interesting people in your company, club, or group!
https://harrisonliddiard.com/project/slack-meetups/
MIT License
18 stars 7 forks source link

"met" flag of incorrect pairing is updated #13

Closed liddiard closed 4 years ago

liddiard commented 4 years ago

Here's the scenario:

  1. Bot asks if you want to meet someone; you reply "yes"
  2. Bot asks if you actually met with your last pairing ("Person X"); you don't reply
  3. The pairing round starts and you get a new pairing ("Person Y")
  4. You reply to the bot's question about your last pairing. Bot looks up what your most recent pairing is, sees the pairing with Person Y, and updates its "met" value instead of the "met" value of the pairing with person Person X as expected.

How to fix:

This assumption is wrong; we shouldn't be querying for the latest pairing, but rather for the latest pairing from a round that ended in the past.

liddiard commented 4 years ago

fixed (bug applies to rtm branch only): 2339f46cebc3df6d0e6e40901f354fa5156f37d2