Skip to content

A diary session opened on the phone is invisible to the bot #143

Open

Description

@lumenpearson

What is missing. A diary session registered from a phone (POST /api/v1/diary/session) carries no Telegram account and no class. The bot's «📒 Мой дневник» finds a session by both, so it never sees the phone's session, and a student who uses both signs in twice.

Why it was left. Linking needs the class device token on a /diary request, which is the one place the two bearer families would meet. It also has three costs the owner should weigh first:

  • the bot's «Выйти» would sign the phone out too;
  • deleting the class would take the phone's diary session with it (class_id cascades);
  • rebinding the class to another region or school expires it.

A first design (a separate X-Device-Token header, linking only when the device is linked to that Telegram account and the class is bound to the same diary) is in the batch's design notes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      Someday

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions