fix: make parse_log_lines treat info differently from msgs

This commit is contained in:
mathieui 2021-04-09 22:01:53 +02:00
parent d63b65f556
commit 835d7c855a

View file

@ -409,11 +409,13 @@ def parse_log_lines(lines: List[str], jid: str = '') -> List[Dict[str, Any]]:
message_lines = []
message = {
'history': True,
'time': common.get_local_time(log_item.time)
'time': common.get_local_time(log_item.time),
'type': 'message',
}
size = log_item.nb_lines
if isinstance(log_item, LogInfo):
message_lines.append(log_item.text)
message['type'] = 'info'
elif isinstance(log_item, LogMessage):
message['nickname'] = log_item.nick
message_lines.append(log_item.text)