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

修复飞书用户改名后未正确显示 #229

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions server/tasks/lark/lark.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,18 @@ def get_contact_by_lark_application(application_id):
db.session.add(bind_user)
db.session.commit()
user_ids.append(bind_user_id)
else:
# 如果已拉取过用户则更新 bind_user 信息
db.session.query(BindUser).filter(
BindUser.id == bind_user_id
).update(
dict(
name=item["name"],
avatar=item["avatar"]["avatar_origin"],
extra=item,
)
)
db.session.commit()
db.session.query(IMApplication).filter(
IMApplication.id == application.id,
).update(dict(status=1))
Expand Down
Loading