summaryrefslogtreecommitdiff
path: root/mail
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
commitcb48866375576273f4eb4d76362d39bc160b35bd (patch)
tree629dfb08f8941514cd3c6863d81f20aa4722dd2d /mail
parentc1aab81de2dcc69e3dd39f9f11501d1236a4a9db (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.
Diffstat (limited to 'mail')
-rw-r--r--mail/src/leap/mail/imap/server.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/mail/src/leap/mail/imap/server.py b/mail/src/leap/mail/imap/server.py
index b6f1e47a..03973374 100644
--- a/mail/src/leap/mail/imap/server.py
+++ b/mail/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
+