Commit 9eb2654c authored by Tijmen de Mes's avatar Tijmen de Mes

Fixed decrypting messages after key import

parent 7cb50745
......@@ -813,8 +813,9 @@ class MessageManager(object, metaclass=Singleton):
request.account.save()
for session in [session for session in self.sessions if session.account is request.account]:
notification_center = NotificationCenter()
notification_center.post_notification('PGPKeysShouldReload', sender=session)
stream = session.fake_streams.get('messages')
if not stream.can_encrypt:
stream.enable_pgp()
while self._incoming_encrypted_message_queue:
message, account, contact = self._incoming_encrypted_message_queue.popleft()
......
......@@ -257,7 +257,7 @@ class MessageStream(object, metaclass=MediaStreamType):
if self.private_key is None:
self.private_key = self._load_key(str(session.account.id), public_key=False)
if None not in [self.remote_public_key, self.public_key, self.private_key]:
if None not in [self.public_key, self.private_key]:
notification_center = NotificationCenter()
notification_center.post_notification('MessageStreamPGPKeysDidLoad', sender=self)
self._load_other_keys(session)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment