mirror of
https://github.com/System-End/nephthys.git
synced 2026-04-19 23:22:50 +00:00
Don't also send resolved message for most macros (#112)
* Don't send resolved message for most macros * Make the ship cert macro only apply to SoM * Add notes to the end of the resolving macros (for FT)
This commit is contained in:
parent
fdb729a00b
commit
86eb418220
7 changed files with 44 additions and 1 deletions
|
|
@ -25,4 +25,5 @@ class FAQ(Macro):
|
|||
ts=ticket.msgTs,
|
||||
resolver=helper.slackId,
|
||||
client=env.slack_client,
|
||||
send_resolved_message=False,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -25,4 +25,5 @@ class Fraud(Macro):
|
|||
ts=ticket.msgTs,
|
||||
resolver=helper.slackId,
|
||||
client=env.slack_client,
|
||||
send_resolved_message=False,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -25,4 +25,5 @@ class Identity(Macro):
|
|||
ts=ticket.msgTs,
|
||||
resolver=helper.slackId,
|
||||
client=env.slack_client,
|
||||
send_resolved_message=False,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -12,12 +12,22 @@ class ShipCertQueue(Macro):
|
|||
"""
|
||||
A simple macro telling people about the ship certification backlog
|
||||
"""
|
||||
macro_text = env.transcript.ship_cert_queue_macro
|
||||
if not macro_text:
|
||||
# Not all events have this macro
|
||||
await env.slack_client.chat_postEphemeral(
|
||||
channel=env.slack_help_channel,
|
||||
thread_ts=ticket.msgTs,
|
||||
user=helper.slackId,
|
||||
text=f"Invalid macro: The `{self.name}` macro is not configured for this channel.",
|
||||
)
|
||||
return
|
||||
sender = await env.db.user.find_first(where={"id": ticket.openedById})
|
||||
if not sender:
|
||||
return
|
||||
user = await get_user_profile(sender.slackId)
|
||||
await reply_to_ticket(
|
||||
text=f"Hi {user.display_name()}! Unfortunately, there is a backlog of projects awaiting ship certification; please be patient. \n\n *pssst... voting more will move your project further towards the front of the queue.*",
|
||||
text=macro_text.replace("(user)", user.display_name()),
|
||||
ticket=ticket,
|
||||
client=env.slack_client,
|
||||
)
|
||||
|
|
@ -25,4 +35,5 @@ class ShipCertQueue(Macro):
|
|||
ts=ticket.msgTs,
|
||||
resolver=helper.slackId,
|
||||
client=env.slack_client,
|
||||
send_resolved_message=False,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -90,6 +90,11 @@ class Transcript(BaseModel):
|
|||
default="", description="Message to be sent when the identity macro is used"
|
||||
)
|
||||
|
||||
ship_cert_queue_macro: str | None = Field(
|
||||
default=None,
|
||||
description="Message to be sent when the ship cert queue macro is used (only applies to SoM)",
|
||||
)
|
||||
|
||||
home_unknown_user_title: str = Field(
|
||||
default=":upside-down_orpheus: woah, stop right there {name}!",
|
||||
description="Title for unknown user on home page",
|
||||
|
|
|
|||
|
|
@ -27,6 +27,26 @@ class Flavortown(Transcript):
|
|||
ticket_resolve: str = f"""
|
||||
Aha, this post has just been marked as resolved by <@{{user_id}}>! I'll head back to the kitchen now, \
|
||||
but if you need any more help, just send another message in <#{help_channel}> and I'll be right back o/
|
||||
"""
|
||||
|
||||
faq_macro: str = f"""
|
||||
Hi (user), this question is already answered in our FAQ! Here's the link again: <{faq_link}|*Flavortown FAQ*>.
|
||||
|
||||
_I've marked this question as resolved, so please start a new thread if you need more help_
|
||||
"""
|
||||
identity_macro: str = f"""
|
||||
Hi (user), please could you ask questions about identity verification in <#{identity_help_channel}>? :rac_cute:
|
||||
|
||||
It helps the verification team keep track of questions easier!
|
||||
|
||||
_I've marked this thread as resolved_
|
||||
"""
|
||||
fraud_macro: str = """
|
||||
Hi (user), would you mind directing any fraud related queries to <@U091HC53CE8>? :rac_cute:
|
||||
|
||||
It'll keep your case confidential and make it easier for the fraud team to keep track of!
|
||||
|
||||
_I've marked this thread as resolved_
|
||||
"""
|
||||
|
||||
home_unknown_user_title: str = ":upside-down_orpheus: woah, wait one sec!"
|
||||
|
|
|
|||
|
|
@ -23,6 +23,10 @@ if your question has been answered, please hit the button below to mark it as re
|
|||
resolve_ticket_button: str = "i get it now"
|
||||
ticket_resolve: str = f"oh, oh! it looks like this post has been marked as resolved by <@{{user_id}}>! if you have any more questions, please make a new post in <#{help_channel}> and someone'll be happy to help you out! not me though, i'm just a silly racoon ^-^"
|
||||
|
||||
ship_cert_queue_macro: str | None = (
|
||||
"hi (user)! unfortunately, there is a backlog of projects awaiting ship certification; please be patient. \n\n *pssst... voting more will move your project further towards the front of the queue.*"
|
||||
)
|
||||
|
||||
home_unknown_user_title: str = (
|
||||
":upside-down_orpheus: woah, stop right there {name}!"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue