mirror of
https://github.com/Xtao-Labs/misskey2telegram.git
synced 2024-11-22 13:55:53 +00:00
fix: spoiler
This commit is contained in:
parent
a02022d3a3
commit
b9479fcd88
@ -437,14 +437,32 @@ async def send_update(
|
||||
if file_type.startswith("image"):
|
||||
if "gif" in file_type:
|
||||
return await send_gif(
|
||||
host, cid, url, note, topic_id, show_second, spoiler
|
||||
host,
|
||||
cid,
|
||||
url,
|
||||
note,
|
||||
topic_id,
|
||||
show_second,
|
||||
file.is_sensitive and spoiler,
|
||||
)
|
||||
return await send_photo(
|
||||
host, cid, url, note, topic_id, show_second, spoiler
|
||||
host,
|
||||
cid,
|
||||
url,
|
||||
note,
|
||||
topic_id,
|
||||
show_second,
|
||||
file.is_sensitive and spoiler,
|
||||
)
|
||||
elif file_type.startswith("video"):
|
||||
return await send_video(
|
||||
host, cid, url, note, topic_id, show_second, spoiler
|
||||
host,
|
||||
cid,
|
||||
url,
|
||||
note,
|
||||
topic_id,
|
||||
show_second,
|
||||
file.is_sensitive and spoiler,
|
||||
)
|
||||
elif file_type.startswith("audio"):
|
||||
return await send_audio(host, cid, url, note, topic_id, show_second)
|
||||
|
@ -13,6 +13,7 @@ from pyrogram.types import (
|
||||
|
||||
from defs.web_app import WebAppData, WebAppUserConfig, filter_web_data
|
||||
from glover import web_domain
|
||||
from init import logs
|
||||
from misskey_init import rerun_misskey_bot
|
||||
from models.services.user_config import UserConfigAction
|
||||
|
||||
@ -35,6 +36,7 @@ async def process_user_config(_, message: Message):
|
||||
user_config.timeline_spoiler = data.timeline_spoiler
|
||||
user_config.push_spoiler = data.push_spoiler
|
||||
await UserConfigAction.add_user_config(user_config)
|
||||
logs.info(f"{message.from_user.id} 更新设置成功")
|
||||
await message.reply("更新设置成功。", quote=True, reply_markup=ReplyKeyboardRemove())
|
||||
await rerun_misskey_bot(message.from_user.id)
|
||||
|
||||
@ -61,3 +63,4 @@ async def notice_user_config(_, message: Message):
|
||||
[[KeyboardButton(text="web config", web_app=WebAppInfo(url=url))]]
|
||||
),
|
||||
)
|
||||
logs.info(f"{message.from_user.id} 请求更改设置")
|
||||
|
Loading…
Reference in New Issue
Block a user