Skip to content
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

## Current Behavior #336

Open
asgardthundee opened this issue Dec 10, 2024 · 1 comment
Open

## Current Behavior #336

asgardthundee opened this issue Dec 10, 2024 · 1 comment

Comments

@asgardthundee
Copy link

Current Behavior

Currently telega keeps the user online forever as long as the emacs's frame is focused.

As a result, the user might appear being online, even though they are not. Many people run emacs in a TTY or do other tasks in their emacs while telega is running on the background. For example emacs might be installing/upgrading packages or performing some other tasks which prevent the user from interacting with telega at all.

Desired behaviour

Improve status management. The user should be considered being online only, when they are really receiving updates from telega or actively interacting with it.

For example on smart phones (which are the primary target platform of Telegram) there is automatic screen locking which kicks in, if the user does not interact with the Telegram application for a few seconds. Emacs does not have this kind of screen locking, because of the completely different nature of its interface. However, an open telega buffer does not mean that the user is actively working in Telegram, in the same way as having an open Chess buffer somewhere in emacs does not mean that the user is actively playing chess.

Status management should be configurable, so that the user can themselves define, which behaviour most accurately fits their common emacs usage pattern.

Possible Solution

  1. Check if any telega buffer is visible in any frame that is being displayed on the screen, and set the user's status to offline/online respectively.
  2. Automatically set user's sstatus to offline, if there has not been any input to a telega buffer within a specified interval. This emulates the behaviour of Telegram on smart phones. If necessary, the buffers can be cleared of all content, so that the user needs to type a command to reactivate the buffer and thus also set their status to online.

The most reliable method would be to combine 1 and 2 so that the user is online only, if a telega buffer is visible, and the user has run an emacs command in that buffer within a reasonable time interval (e.g. 30 seconds).

Originally posted by @Merivuokko in zevlg/telega.el#171

@zevlg
Copy link

zevlg commented Dec 14, 2024

@asgardthundee How is telega related to https://github.com/T-vK/ESP32-BLE-Keyboard project? Why do you create issues in different projects, referring telega ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants