From 7e35ea6bdffe4ff815aab03d4876de68815ea3a6 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Thu, 24 Aug 2017 14:16:37 +0200 Subject: [PATCH] Email gateway autoregistration fixes - don't treat "@" in label as an email address - ask for confirmation before autoregistering. It confused some newbies into thinking that bitmessage requires payment --- src/bitmessageqt/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 9f4f0b04..014831bf 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -1968,12 +1968,16 @@ class MyForm(settingsmixin.SMainWindow): if "<" in toAddress and ">" in toAddress: toAddress = toAddress.split('<')[1].split('>')[0] # email address - elif toAddress.find("@") >= 0: + if toAddress.find("@") >= 0: if isinstance(acct, GatewayAccount): acct.createMessage(toAddress, fromAddress, subject, message) subject = acct.subject toAddress = acct.toAddress else: + if QtGui.QMessageBox.question(self, "Sending an email?", _translate("MainWindow", + "You are trying to send an email instead of a bitmessage. This requires registering with a gateway. Attempt to register?"), + QtGui.QMessageBox.Yes|QtGui.QMessageBox.No) != QtGui.QMessageBox.Yes: + continue email = acct.getLabel() if email[-14:] != "@mailchuck.com": #attempt register # 12 character random email address