diff --git a/api/messages.py b/api/messages.py index 78dcd054..94c94788 100644 --- a/api/messages.py +++ b/api/messages.py @@ -68,9 +68,9 @@ class Telegram(): taker_nick = order.taker.username site = config('HOST_NAME') if lang == 'es': - text = f'¡Tu orden con ID {order.id} ha sido tomada por {taker_nick}!🥳 Visita http://{site}/order/{order.id} para continuar.' + text = f'Hey {order.maker.username} ¡Tu orden con ID {order.id} ha sido tomada por {taker_nick}!🥳 Visita http://{site}/order/{order.id} para continuar.' else: - text = f'Your order with ID {order.id} was taken by {taker_nick}!🥳 Visit http://{site}/order/{order.id} to proceed with the trade.' + text = f'Hey {order.maker.username}, your order was taken by {taker_nick}!🥳 Visit http://{site}/order/{order.id} to proceed with the trade.' self.send_message(user, text) return @@ -84,9 +84,9 @@ class Telegram(): taker_nick = order.taker.username site = config('HOST_NAME') if lang == 'es': - text = f'¡Tu orden con ID {order.id} ha sido tomada por {taker_nick}!🥳 El tomador ya ha bloqueado su fianza. Visita http://{site}/order/{order.id} para continuar.' + text = f'Hey {order.maker.username} ¡Tu orden con ID {order.id} ha sido tomada por {taker_nick}!🥳 El tomador ya ha bloqueado su fianza. Visita http://{site}/order/{order.id} para continuar.' else: - text = f'Your order with ID {order.id} was taken by {taker_nick}!🥳 The taker bond has already been locked. Visit http://{site}/order/{order.id} to proceed with the trade.' + text = f'Hey {order.maker.username}, your order with ID {order.id} was taken by {taker_nick}!🥳 The taker bond has already been locked. Visit http://{site}/order/{order.id} to proceed with the trade.' self.send_message(user, text) return @@ -99,9 +99,9 @@ class Telegram(): lang = user.profile.telegram_lang_code site = config('HOST_NAME') if lang == 'es': - text = f'El depósito de garantía y el recibo del comprador han sido recibidos. Es hora de enviar el dinero fiat. Visita http://{site}/order/{order.id} para hablar con tu contraparte.' + text = f'Hey {order.maker.username}, el depósito de garantía y el recibo del comprador han sido recibidos. Es hora de enviar el dinero fiat. Visita http://{site}/order/{order.id} para hablar con tu contraparte.' else: - text = f'The escrow and invoice have been submitted. The fiat exchange starts now via the platform chat. Visit http://{site}/order/{order.id} to talk with your counterpart.' + text = f'Hey {order.maker.username}, the escrow and invoice have been submitted. The fiat exchange starts now via the platform chat. Visit http://{site}/order/{order.id} to talk with your counterpart.' self.send_message(user, text) return @@ -114,9 +114,9 @@ class Telegram(): lang = user.profile.telegram_lang_code site = config('HOST_NAME') if lang == 'es': - text = f'Tu orden con ID {order.id} ha expirado sin ser tomada por ningún robot. Visita http://{site}/order/{order.id} para renovarla.' + text = f'Hey {order.maker.username}, tu orden con ID {order.id} ha expirado sin ser tomada por ningún robot. Visita http://{site}/order/{order.id} para renovarla.' else: - text = f'Your order with ID {order.id} has expired without a taker. Visit http://{site}/order/{order.id} to renew it.' + text = f'Hey {order.maker.username}, your order with ID {order.id} has expired without a taker. Visit http://{site}/order/{order.id} to renew it.' self.send_message(user, text) return @@ -128,7 +128,7 @@ class Telegram(): lang = user.profile.telegram_lang_code if lang == 'es': - text = f'¡Tu orden con ID {order.id} ha finalizado exitosamente!⚡ Únete a nosotros en @robosats_es y ayúdanos a mejorar.' + text = f'¡Tu orden con ID {order.id} ha finalizado exitosamente!⚡ Unase a @robosats_es y ayudanos a mejorar.' else: text = f'Your order with ID {order.id} has finished successfully!⚡ Join us @robosats and help us improve.' @@ -142,9 +142,9 @@ class Telegram(): lang = user.profile.telegram_lang_code if lang == 'es': - text = f'Has cancelado tu orden pública con ID {order.id}.' + text = f'Hey {order.maker.username}, has cancelado tu orden pública con ID {order.id}.' else: - text = f'You have cancelled your public order with ID {order.id}.' + text = f'Hey {order.maker.username}, you have cancelled your public order with ID {order.id}.' self.send_message(user, text) return @@ -156,9 +156,9 @@ class Telegram(): lang = user.profile.telegram_lang_code if lang == 'es': - text = f'El tomador ha cancelado antes de bloquear su fianza.' + text = f'Hey {order.maker.username}, el tomador ha cancelado antes de bloquear su fianza.' else: - text = f'The taker has canceled before locking the bond.' + text = f'Hey {order.maker.username}, the taker has canceled before locking the bond.' self.send_message(user, text) return @@ -170,13 +170,13 @@ class Telegram(): lang = user.profile.telegram_lang_code if lang == 'es': - text = f'El tomador no ha bloqueado la fianza a tiempo.' + text = f'Hey {order.maker.username}, el tomador no ha bloqueado la fianza a tiempo.' else: - text = f'The taker has not locked the bond in time.' + text = f'Hey {order.maker.username}, the taker has not locked the bond in time.' self.send_message(user, text) return - + def collaborative_cancelled(self, order): user = order.maker if not user.profile.telegram_enabled: @@ -184,9 +184,9 @@ class Telegram(): lang = user.profile.telegram_lang_code if lang == 'es': - text = f'La orden con ID {str(order.id)} fue cancelada colaborativamente.' + text = f'Hey {order.maker.username}, tu orden con ID {str(order.id)} fue cancelada colaborativamente.' else: - text = f'Your order with ID {str(order.id)} has been collaboratively cancelled.' + text = f'Hey {order.maker.username}, your order with ID {str(order.id)} has been collaboratively cancelled.' self.send_message(user, text) return @@ -198,9 +198,9 @@ class Telegram(): lang = user.profile.telegram_lang_code if lang == 'es': - text = f'La orden con ID {str(order.id)} ha entrado en disputa.' + text = f'Hey {order.maker.username}, la orden con ID {str(order.id)} ha entrado en disputa.' else: - text = f'A dispute has been opened on your order with ID {str(order.id)}.' + text = f'Hey {order.maker.username}, a dispute has been opened on your order with ID {str(order.id)}.' self.send_message(user, text) return @@ -219,10 +219,10 @@ class Telegram(): print(str(order.id)) if lang == 'es': - text = f'Tu orden con ID {str(order.id)} es pública en el libro de ordenes.' + text = f'Hey {order.maker.username}, tu orden con ID {str(order.id)} es pública en el libro de ordenes.' else: - text = f"Your order with ID {str(order.id)} is public in the order book." + text = f"Hey {order.maker.username}, your order with ID {str(order.id)} is public in the order book." self.send_message(user, text) user.profile.telegram_welcomed = True user.profile.save() - return + return \ No newline at end of file