Skip to content

Commit

Permalink
Merge pull request #235 from ConnectAI-E/freeziyou-022601
Browse files Browse the repository at this point in the history
修复多仓库默认绑定当前群聊
  • Loading branch information
lloydzhou authored Feb 26, 2024
2 parents 82f7dab + 497e2b3 commit 53464aa
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions server/tasks/lark/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,14 @@ def create_chat_group_for_repo(
# 把user_id_list中的每个user_id查User表,获取每个人的名字
user_name_list = [
name
for name, in db.session.query(IMUser.name).filter(
for name, in db.session.query(IMUser.name)
.filter(
IMUser.openid.in_(user_id_list),
)
.distinct()
]
try:
chat_id == args[1]["event"]["message"]["chat_id"]
chat_id = args[1]["event"]["message"]["chat_id"]
except Exception as e:
chat_id = ""

Expand Down Expand Up @@ -382,7 +384,7 @@ def create_chat_group_for_repo(

content = "\n".join(
[
f"1. 成功绑定名为「{chat_name}」的项目群",
f"1. 成功绑定名为「{chat_name if chat_name else exists_chat_group.name}」的项目群",
invite_message,
]
)
Expand Down

0 comments on commit 53464aa

Please sign in to comment.