mirror of
https://github.com/RoboSats/robosats.git
synced 2025-02-21 12:49:02 +00:00
Fix bugs, second dispute statement is awaited.
This commit is contained in:
parent
3902159b67
commit
67a108e0ac
@ -362,7 +362,7 @@ class Logics:
|
|||||||
order.taker_statement = statement
|
order.taker_statement = statement
|
||||||
|
|
||||||
# If both statements are in, move status to wait for dispute resolution
|
# If both statements are in, move status to wait for dispute resolution
|
||||||
if order.maker_statement not in [None,""] or order.taker_statement not in [None,""]:
|
if order.maker_statement not in [None,""] and order.taker_statement not in [None,""]:
|
||||||
order.status = Order.Status.WFR
|
order.status = Order.Status.WFR
|
||||||
order.expires_at = timezone.now() + timedelta(
|
order.expires_at = timezone.now() + timedelta(
|
||||||
seconds=Order.t_to_expire[Order.Status.WFR])
|
seconds=Order.t_to_expire[Order.Status.WFR])
|
||||||
|
@ -44,7 +44,12 @@ class Telegram():
|
|||||||
|
|
||||||
def welcome(self, user):
|
def welcome(self, user):
|
||||||
lang = user.profile.telegram_lang_code
|
lang = user.profile.telegram_lang_code
|
||||||
order = Order.objects.get(maker=user, status=Order.Status.PUB)
|
|
||||||
|
# In weird cases the order cannot be found (e.g. it is cancelled)
|
||||||
|
|
||||||
|
queryset = Order.objects.filter(maker=user)
|
||||||
|
order = queryset.last()
|
||||||
|
|
||||||
print(str(order.id))
|
print(str(order.id))
|
||||||
if lang == 'es':
|
if lang == 'es':
|
||||||
text = f'Hola {user.username}, te enviaré un mensaje cuando tu orden con ID {str(order.id)} haya sido tomada.'
|
text = f'Hola {user.username}, te enviaré un mensaje cuando tu orden con ID {str(order.id)} haya sido tomada.'
|
||||||
|
Loading…
Reference in New Issue
Block a user