summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-04-09 22:01:53 +0200
committermathieui <mathieui@mathieui.net>2021-04-11 16:33:53 +0200
commit835d7c855a1e5d5ef4f6b02eeeac58ec77072d3b (patch)
tree2864217e5d2857d3cef514d877174db1e06278cc
parentd63b65f556aed10a220e6d24988782678c6e8150 (diff)
downloadpoezio-835d7c855a1e5d5ef4f6b02eeeac58ec77072d3b.tar.gz
poezio-835d7c855a1e5d5ef4f6b02eeeac58ec77072d3b.tar.bz2
poezio-835d7c855a1e5d5ef4f6b02eeeac58ec77072d3b.tar.xz
poezio-835d7c855a1e5d5ef4f6b02eeeac58ec77072d3b.zip
fix: make parse_log_lines treat info differently from msgs
-rw-r--r--poezio/logger.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/poezio/logger.py b/poezio/logger.py
index df26af6f..b7fe83c8 100644
--- a/poezio/logger.py
+++ b/poezio/logger.py
@@ -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)