Merge branch 'main' of git.woni.link:wn0x00/office_xbot_feishu

合并
This commit is contained in:
jianxin committed 2025-10-10 09:38:44 +08:00
commit a6bb166a28
6 files changed
+610 -57

No files matched your search

+14 -1
View File
@@ -17,6 +17,8 @@ from app.utils.feishu import (
)
from app.utils.utils import update_record, add_record
from app.utils.yd_utils import new_blank_robot, new_blank_activity
from app.utils.xbot_utils import push_xbot_activity_bot
from app.utils.xbot_utils import send_select_activity_card_message
def parse_history_message(data):
@@ -147,11 +149,17 @@ def process_message_callback(
content = json.loads(message_data.get("content"))
content_text = content.get("text")
if "记录问题" not in content_text:
if "记录问题" not in content_text and "下载指令" not in content_text:
# 忽略非记录问题的消息
lark.logger.info("忽略非记录问题的消息")
return
# 根据消息内容走不同的逻辑
if "下载指令" in content_text:
# 发送一个卡片消息
send_select_activity_card_message(message_id)
return
record_category = "官方指令" if "指令" in content_text else "官方应用"
record = {}
@@ -400,3 +408,8 @@ def process_new_robot(app_id, app_secret, action_data):
table_id = "tbl2GcBvkvMtOBnl"
add_record(client, bitable_token, table_id, catagory_table_record)
@shared_task(include_result=False)
def process_push_xbot_activity_bot(activity_code, open_id, open_message_id):
push_xbot_activity_bot(activity_code, open_id, open_message_id)