Skip to content
Closed
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion pybot/endpoints/slack/actions/mentor_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ async def mentor_details_submit(action: Action, app: SirBot):


async def open_details_dialog(action: Action, app: SirBot):
request = MentorRequest(action)
cur_details = request.details
trigger_id = action["trigger_id"]
response = {"trigger_id": trigger_id, "dialog": mentor_details_dialog(action)}
response = {"trigger_id": trigger_id, "dialog": mentor_details_dialog(action, cur_details)}
await app.plugins["slack"].api.query(methods.DIALOG_OPEN, response)


Expand Down
3 changes: 2 additions & 1 deletion pybot/endpoints/slack/utils/action_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def build_report_message(slack_id, details, message_details):
return {"text": message, "channel": MODERATOR_CHANNEL, "attachments": attachment}


def mentor_details_dialog(action):
def mentor_details_dialog(action, cur_details):
trigger_id = action["trigger_id"]
ts = action["message"]["ts"]

Expand All @@ -269,6 +269,7 @@ def mentor_details_dialog(action):
"name": "details",
"placeholder": "",
"required": False,
"value": cur_details
}
],
}
Expand Down