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

Add ability to specify to "rerender" last message instead of sending new. #30

Open
idchlife opened this issue Apr 25, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@idchlife
Copy link
Owner

We should store last message id in memory in format like "TG_USER_ID-LAST_BOT_MESSAGE_ID".

I think getting bot message id is possible after sending with sendMessage api method.

respond do
  # Here your response
  
  tg_rerender true
end

Which would edit message user respon

@idchlife idchlife added the enhancement New feature or request label Apr 25, 2023
@notetell
Copy link
Collaborator

notetell commented Apr 27, 2023

Telegram API allows to send either text, or use specific API methods for sending specific media type with text caption, or send just a media file without text. Also we cant send a message that will be formatted like "text above - image - text below" for example. That means that if our output has an attachment - it will be sent as a separate message.

Because of this we will accept that if response has multiple outputs OR if output has attachment - than output's id will not be saved, also we will delete previously recorded message id - so we don't have a situation where we rerender the message that is way above. We will only rerender messages that have one output.

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

No branches or pull requests

2 participants