Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 7710f79

Browse files
committed
Clean up moderation messages
1 parent f9c7345 commit 7710f79

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

market/moderation.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,12 @@ def process_dispute(contract, db, message_listener, notification_listener, testn
129129

130130
# Send SMTP notification
131131
notification = SMTPNotification(db)
132-
notification.send("[OpenBazaar] Dispute Opened: #%s" % order_id,
133-
"A dispute has been opened by %s for Order #%s: \"%s\"" % (guid, order_id, title))
132+
guid = guid.encode("hex")
133+
notification.send("[OpenBazaar] Dispute Opened",
134+
"A dispute has been opened.\n\n"
135+
"Order: %s\n"
136+
"Opened By: %s\n"
137+
"Title: %s" % (order_id, guid, title))
134138

135139

136140
def close_dispute(resolution_json, db, message_listener, notification_listener, testnet):
@@ -197,5 +201,9 @@ def close_dispute(resolution_json, db, message_listener, notification_listener,
197201

198202
# Send SMTP notification
199203
notification = SMTPNotification(db)
200-
notification.send("[OpenBazaar] Dispute Closed: #%s" % order_id,
201-
"A dispute has been closed by %s for Order #%s: \"%s\"" % (moderator_guid, order_id, title))
204+
guid = moderator_guid.encode("hex")
205+
notification.send("[OpenBazaar] Dispute Closed",
206+
"A dispute has been closed.\n\n"
207+
"Order: %s\n"
208+
"Closed By: %s\n"
209+
"Title: %s" % (order_id, guid, title))

0 commit comments

Comments
 (0)