diff options
author | mathieui <mathieui@mathieui.net> | 2021-04-09 22:01:53 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2021-04-11 16:33:53 +0200 |
commit | 835d7c855a1e5d5ef4f6b02eeeac58ec77072d3b (patch) | |
tree | 2864217e5d2857d3cef514d877174db1e06278cc | |
parent | d63b65f556aed10a220e6d24988782678c6e8150 (diff) | |
download | poezio-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.py | 4 |
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) |