Print out a message when logging in.

This commit is contained in:
poljar (Damir Jelić) 2018-02-27 19:55:30 +01:00
parent 6822084d59
commit f9971ce443
2 changed files with 8 additions and 0 deletions

View file

@ -79,6 +79,10 @@ class MatrixLoginEvent(MatrixEvent):
self.server.user_id = self.user_id self.server.user_id = self.user_id
self.server.client.access_token = self.access_token self.server.client.access_token = self.access_token
message = "{prefix}matrix: Logged in as {user}".format(
prefix=W.prefix("network"), user=self.user_id)
W.prnt(self.server.server_buffer, message)
self.server.sync() self.server.sync()
@classmethod @classmethod

View file

@ -377,6 +377,10 @@ class MatrixServer:
self.device_name) self.device_name)
self.send_or_queue(message) self.send_or_queue(message)
msg = "{prefix}matrix: Logging in...".format(prefix=W.prefix("network"))
W.prnt(self.server_buffer, msg)
def _print_message_error(self, message): def _print_message_error(self, message):
server_buffer_prnt(self, server_buffer_prnt(self,
("{prefix}Unhandled {status_code} error, please " ("{prefix}Unhandled {status_code} error, please "