summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2016-03-23 17:48:36 -0400
committerKali Kaneko <kali@leap.se>2016-03-24 14:00:12 -0400
commit7c9082152155100b171450f54c56c614104175df (patch)
tree7d82b00a653c06b15070481ffc5f39546b2c8b25
parent13927ac178c00b729d8d660107f72d878879a5c3 (diff)
[bug] emit imap-login event again
this was gone with the imap/cred refactor, but the client relies on it to hide the 'congratulations!' welcome display on the mail widget.
-rw-r--r--src/leap/mail/imap/server.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/leap/mail/imap/server.py b/src/leap/mail/imap/server.py
index b6f1e47..0397337 100644
--- a/src/leap/mail/imap/server.py
+++ b/src/leap/mail/imap/server.py
@@ -29,6 +29,8 @@ from twisted.internet import defer, interfaces
from twisted.mail.imap4 import IllegalClientResponse
from twisted.mail.imap4 import LiteralString, LiteralFile
+from leap.common.events import emit_async, catalog
+
def _getContentType(msg):
"""
@@ -609,7 +611,6 @@ class LEAPIMAPServer(imap4.IMAP4Server):
d.addCallback(send_response)
return d
# XXX patched ---------------------------------
-
# -----------------------------------------------------------------------
auth_APPEND = (do_APPEND, arg_astring, imap4.IMAP4Server.opt_plist,
@@ -685,3 +686,9 @@ class LEAPIMAPServer(imap4.IMAP4Server):
#############################################################
# END of Twisted imap4 patch to support LITERAL+ extension
#############################################################
+
+ def authenticateLogin(self, user, passwd):
+ result = imap4.IMAP4Server.authenticateLogin(self, user, passwd)
+ emit_async(catalog.IMAP_CLIENT_LOGIN, str(user))
+ return result
+