Skip to content
Merged
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
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@
<a href="https://operationcode.org">
<img
alt="Operation Code Hacktoberfest Banner"
src="https://s3.amazonaws.com/operationcode-assets/branding/logos/large-blue-logo.png"
src="https://operation-code-assets.s3.us-east-2.amazonaws.com/operation_code_hacktoberfest_2019.jpg"
>
</a>
<br />
<br />
</div>

# 🎃 Hacktoberfest 🎃

[All the details you need](https://github.com/OperationCode/START_HERE/blob/master/README.md#-hacktoberfest-) before participating with us.

<br />

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Twitter Follow](https://img.shields.io/twitter/follow/operation_code.svg?style=social&label=Follow&style=social)](https://twitter.com/operation_code)
[![Code-style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
Expand Down
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