serokell / tzbot

Timezone bot for Slack
Mozilla Public License 2.0
7 stars 2 forks source link

Skip sending messages when timezone is matching #53

Closed Martoon-00 closed 1 year ago

Martoon-00 commented 1 year ago

Clarification and motivation

From #4:

We don't always want to send an ephemeral message to all users. If a user meets one of the following criteria, we should skip it:

Let's discuss and handle the concern under this ticket.

At the moment we implemented a simpler strategy: never skip sending notification, by rather say "timezone is the same" when appropriate.

Acceptance criteria

Martoon-00 commented 1 year ago

A link to some corner case.

Martoon-00 commented 1 year ago

I as a user think that always getting a notification would be better :thinking: :thinking:

If the bot says nothing, I cannot conclude from that that the timezone is the same. The server with bot can have issues, it could fail to parse my tricky time reference, or I could make a typo in timezone name causing the bot to use my local timezone instead of the written one.

This means that if I want to rely on Bot's reaction (or its absence), I should infer myself whether the mentioned timezone matches mine or not, and this way distinguish between intentional silence or an accidence. But it's hard.


What is generally the motivation for skipping messages?

If it is - not to be annoying when the user already knows that his colleague is in the same timezone, then this can be handled differently for most of the cases by simply inviting the bot only into the channels with people from different timezones.

If the team has all the members from one timezone except for one, then I think it's better to let users configure blacklists/whitelists with people on who's messages the Bot should react. So that there is no need to guess for some unfamiliar person - whether they are in the same timezone as me or something is wrong with the Bot. But this is already my personal view of preferred UX and many people may disagree.

YuriRomanowski commented 1 year ago

At the moment we implemented a simpler strategy: never skip sending notification, by rather say "timezone is the same" when appropriate.

Minor fix: this is not yet in main branch, just implemented here.

As a user, I would also like the bot to notify me when our timezones with a sender are the same. There are some steps between a message typed and sent by the sender and achieving an ephemeral by a receiver:

If we don't notify on same timezones, an extra point is added to this list, and for user to figure out why he is not notified he should check that 1. bot is working (and working correctly) 2. their timezones are really the same.

It seems that much more natural way is to whitelist a colleague and refuse to get notifications from him explicitly, unless timezone is explicitly mentioned in text.

As for discussing how exactly to solve this, we can start from what I've implemented in the PR mentioned above (the PR itself was devoted to another issue and I thought that would be just a small fix, but that was a mistake).

What is implemented there (and matches with my opinion):

  1. When we translate a message in a chat (not modal) 1.1. For author, notify only about invalid time references or time refs in different explicit timezone 1.2. For others, notify about everything, but if the timezone is the same, type "your timezone is the same"
  2. When we translate a message in a modal: no difference for authors/senders

Let's discuss and complement this scheme @dcastro @Martoon-00