-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Automatically skip and unsub inactive users #78
base: main
Are you sure you want to change the base?
Conversation
9cb1749
to
51fe358
Compare
Added myself as a reviewer to put it on my to-do list! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LG.
Probably good for us to try this out on dev
for a bit -- get Pairing Bot to pair us up a couple times and then evict us?
@@ -193,6 +214,18 @@ func (pl *PairingLogic) match(w http.ResponseWriter, r *http.Request) { | |||
if err := pl.pdb.SetNumPairings(ctx, int(timestamp), numPairings); err != nil { | |||
log.Printf("Failed to record today's pairings: %s", err) | |||
} | |||
|
|||
for _, r := range inactive { | |||
if err := pl.rdb.Delete(ctx, r.id); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe: send the message, and then only delete if we successfully sent the message?
I'd hate to see someone "silently" unsubscribed if there's a bug here.
@@ -13,9 +14,14 @@ import ( | |||
|
|||
const owner string = `@_**Maren Beam (SP2'19)**` | |||
const oddOneOutMessage string = "OK this is awkward.\nThere were an odd number of people in the match-set today, which means that one person couldn't get paired. Unfortunately, it was you -- I'm really sorry :(\nI promise it's not personal, it was very much random. Hopefully this doesn't happen again too soon. Enjoy your day! <3" | |||
const matchedMessage = "Hi you two! You've been matched for pairing :)\n\nHave fun!" | |||
const matchedMessage = "Hi you two! You've been matched for pairing :)\n\nHave fun!\n\nNote: In an effort to reduce the frequency of no-show partners, I'll soon start automatically unsubscribing users that I haven't heard from in a while. Please message me back so I know you're an active user (and messages in this chat count!) :heart:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe: "... in a while. Please reply (or message me separately) so I know you're an active user! ❤️ Thank you!"
This is a potential implementation of inactive user handling (#75). This is a draft because I have not tested it at all.
From the issue/comments on #75 itself:
I've called this
openPairings
here, but I'm very open to alternative names!I chose to hook into the existing pairing cron for this. This gives users as much time as possible to respond to the existing pairing. It's also a time we're already regularly sending out lots of messages.
The consensus seems to be 3, but it's a quick patch to change it :)
Added! I'm still tuning my sense of "writing as Pairing Bot", so feedback is very much welcome!
I agree! I could see us sending a warning message at
max - 1
, but I didn't want this to get too complicated before I actually understand the code 😅I've tried to extend the pairing message to indicate that we're looking for chat interaction now, but I struggled to find a great way to word it without making it a whole thing. Help please!