mirror of
https://github.com/paul-nameless/tg
synced 2024-11-22 03:43:19 +00:00
View msgs when replied
This commit is contained in:
parent
d89abaa2db
commit
b2b82e8407
1 changed files with 2 additions and 1 deletions
|
@ -8,7 +8,6 @@ from tempfile import NamedTemporaryFile
|
|||
from typing import Any, Callable, Dict, List, Optional
|
||||
|
||||
from telegram.utils import AsyncResult
|
||||
|
||||
from tg import config
|
||||
from tg.models import Model
|
||||
from tg.msg import MsgProxy
|
||||
|
@ -263,6 +262,7 @@ class Controller:
|
|||
return
|
||||
reply_to_msg = self.model.current_msg_id
|
||||
if msg := self.view.status.get_input():
|
||||
self.model.view_all_msgs()
|
||||
self.tg.reply_message(chat_id, reply_to_msg, msg)
|
||||
self.present_info("Message reply sent")
|
||||
else:
|
||||
|
@ -286,6 +286,7 @@ class Controller:
|
|||
s.call(config.LONG_MSG_CMD.format(file_path=shlex.quote(f.name)))
|
||||
with open(f.name) as f:
|
||||
if replied_msg := strip_replied_msg(f.read().strip()):
|
||||
self.model.view_all_msgs()
|
||||
self.tg.reply_message(chat_id, reply_to_msg, replied_msg)
|
||||
self.present_info("Message sent")
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue