Skip to content
Snippets Groups Projects
Commit 98e66332 authored by nkour's avatar nkour
Browse files

restore last lines for correct jid

parent 37638f7f
No related branches found
No related tags found
No related merge requests found
......@@ -123,7 +123,7 @@ def get_jid(dirname, filename):
return jid
def decode_jid(string):
'''try to decode (to make it Unicode instance) given jid'''
'''try to decode (to make it Unicode instance) given string'''
# by the time we go to iso15 it better be the one else we show bad characters
encodings = (sys.getfilesystemencoding(), 'utf-8', 'iso-8859-15')
for encoding in encodings:
......
......@@ -120,7 +120,7 @@ class Logger:
if row is not None:
print 'PM!!'
return True
else:
else: # FIXME: THIS NEVER HAPPENS?
print ' NO PM!!'
return False
......@@ -277,9 +277,9 @@ class Logger:
SELECT time, kind, message FROM logs
WHERE jid_id = %d AND kind IN (%d, %d, %d, %d)
ORDER BY time DESC LIMIT %d OFFSET %d
''' % (constants.KIND_SINGLE_MSG_RECV, constants.KIND_CHAT_MSG_RECV,
''' % (jid_id, constants.KIND_SINGLE_MSG_RECV, constants.KIND_CHAT_MSG_RECV,
constants.KIND_SINGLE_MSG_SENT, constants.KIND_CHAT_MSG_SENT,
jid_id, restore_how_many_rows, pending_how_many)
restore_how_many_rows, pending_how_many)
)
results = cur.fetchall()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment