Added <!channel|@channel>
This commit is contained in:
parent
3cf49c7634
commit
1ea873fe17
1 changed files with 5 additions and 5 deletions
|
@ -215,16 +215,16 @@ def get_orders(expression=None):
|
||||||
def post_order_to_webhook(order_item):
|
def post_order_to_webhook(order_item):
|
||||||
message = ''
|
message = ''
|
||||||
if order_item.courrier is not None:
|
if order_item.courrier is not None:
|
||||||
message = '{3} is going to {1}, order <{0}|here>! Deadline in {2} minutes!'.format(
|
message = '<!channel|@channel> {3} is going to {1}, order <{0}|here>! Deadline in {2} minutes!'.format(
|
||||||
url_for('.order', id=order_item.id, _external=True),
|
url_for('.order', id=order_item.id, _external=True),
|
||||||
order_item.location.name,
|
order_item.location.name,
|
||||||
remaining_minutes(order_item.stoptime),
|
remaining_minutes(order_item.stoptime),
|
||||||
order_item.courrier.username.title())
|
order_item.courrier.username.title())
|
||||||
else:
|
else:
|
||||||
message = '<{}|Open here.> New order for {}. Deadline in {} minutes.'.format(
|
message = '<!channel|@channel> New order for {}. Deadline in {} minutes. <{}|Open here.>'.format(
|
||||||
url_for('.order', id=order_item.id, _external=True),
|
|
||||||
order_item.location.name,
|
order_item.location.name,
|
||||||
remaining_minutes(order_item.stoptime))
|
remaining_minutes(order_item.stoptime),
|
||||||
|
url_for('.order', id=order_item.id, _external=True))
|
||||||
webhookthread = WebhookSenderThread(message)
|
webhookthread = WebhookSenderThread(message)
|
||||||
webhookthread.start()
|
webhookthread.start()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue