mirror of
https://github.com/System-End/nephthys.git
synced 2026-04-19 19:45:12 +00:00
fix identity macro
This commit is contained in:
parent
3a28415bf3
commit
3c851d1cfb
1 changed files with 4 additions and 1 deletions
|
|
@ -10,7 +10,10 @@ class Identity(Macro):
|
|||
"""
|
||||
A simple macro telling people to use the identity help channel
|
||||
"""
|
||||
user_info = await env.slack_client.users_info(user=helper.slackId)
|
||||
sender = await env.db.user.find_first(where={"id": ticket.openedById})
|
||||
if not sender:
|
||||
return
|
||||
user_info = await env.slack_client.users_info(user=sender.slackId)
|
||||
name = (
|
||||
user_info["user"]["profile"].get("display_name")
|
||||
or user_info["user"]["profile"].get("real_name")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue