restore correctly error messages. fixes #2880
This commit is contained in:
parent
1599dfdfbb
commit
4d5790e8cb
|
@ -1655,6 +1655,8 @@ class ChatControl(ChatControlBase):
|
||||||
constants.KIND_CHAT_MSG_RECV):
|
constants.KIND_CHAT_MSG_RECV):
|
||||||
kind = 'incoming'
|
kind = 'incoming'
|
||||||
name = self.contact.get_shown_name()
|
name = self.contact.get_shown_name()
|
||||||
|
elif row[1] == constants.KIND_ERROR:
|
||||||
|
kind = 'status'
|
||||||
|
|
||||||
tim = time.localtime(float(row[0]))
|
tim = time.localtime(float(row[0]))
|
||||||
|
|
||||||
|
|
|
@ -425,10 +425,11 @@ class Logger:
|
||||||
# 3 - 8 (we avoid the last 2 lines but we still return 5 asked)
|
# 3 - 8 (we avoid the last 2 lines but we still return 5 asked)
|
||||||
self.cur.execute('''
|
self.cur.execute('''
|
||||||
SELECT time, kind, message FROM logs
|
SELECT time, kind, message FROM logs
|
||||||
WHERE (%s) AND kind IN (%d, %d, %d, %d) AND time > %d
|
WHERE (%s) AND kind IN (%d, %d, %d, %d, %d) AND time > %d
|
||||||
ORDER BY time DESC LIMIT %d OFFSET %d
|
ORDER BY time DESC LIMIT %d OFFSET %d
|
||||||
''' % (where_sql, constants.KIND_SINGLE_MSG_RECV, constants.KIND_CHAT_MSG_RECV,
|
''' % (where_sql, constants.KIND_SINGLE_MSG_RECV,
|
||||||
constants.KIND_SINGLE_MSG_SENT, constants.KIND_CHAT_MSG_SENT,
|
constants.KIND_CHAT_MSG_RECV, constants.KIND_SINGLE_MSG_SENT,
|
||||||
|
constants.KIND_CHAT_MSG_SENT, constants.KIND_ERROR,
|
||||||
timed_out, restore_how_many_rows, pending_how_many)
|
timed_out, restore_how_many_rows, pending_how_many)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue