Skip to content

Infer date/location from context #105

@dcastro

Description

@dcastro

Clarification and motivation

The parser tries its best to parse timer references along with date/location references.

Let's meet at 10am MSK tomorrow
Time ref = 10am, date ref = tomorrow, location ref = MSK

However, sometimes the date/location refs can be located far from the time reference:

How about Thursday? Let's say, 10am?
Tomorrow, I'll be able to connect between 10am and 11am

There was an attempt In #82 to address this concern but, IMO, it went a bit too far.
It "scans" not only the user's message for date/location refs, but also previous messages in the chat as well:

Though I do agree with the intent, I have some concerns:

  1. It kills reproducibility. When a user reports an issue, and the message with the time references is sent to us, we won't be able to reproduce the issue based on that message alone.
  2. I'm a bit worried about other people's messages accidentally affecting the meaning of my messages.
  3. From a quick glance, I think the implementation of Remind contexts and apply to time refs #82 is based on caching time references from messages in a thread. But when the server is restarted, the cache is lost. Which means the result of a conversion would depend on yet another unpredictable variable, "how long the server has been up".

IMO, we should reuse parts of that PR, but we should restrict the behavior to the sender's own message only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions