don't try to log presence when show in unknown
This commit is contained in:
parent
3f2cbf7c46
commit
d38883a92a
|
@ -169,8 +169,6 @@ class Logger:
|
||||||
elif kind == 'chat_msg_sent':
|
elif kind == 'chat_msg_sent':
|
||||||
kind_col = constants.KIND_CHAT_MSG_SENT
|
kind_col = constants.KIND_CHAT_MSG_SENT
|
||||||
|
|
||||||
print 'show', show
|
|
||||||
|
|
||||||
if show == 'online':
|
if show == 'online':
|
||||||
show_col = constants.SHOW_ONLINE
|
show_col = constants.SHOW_ONLINE
|
||||||
elif show == 'chat':
|
elif show == 'chat':
|
||||||
|
@ -184,6 +182,8 @@ class Logger:
|
||||||
elif show == 'offline':
|
elif show == 'offline':
|
||||||
show_col = constants.SHOW_OFFLINE
|
show_col = constants.SHOW_OFFLINE
|
||||||
elif show is None:
|
elif show is None:
|
||||||
|
show_col = constants.SHOW_ONLINE
|
||||||
|
else:
|
||||||
show_col = None
|
show_col = None
|
||||||
|
|
||||||
return kind_col, show_col
|
return kind_col, show_col
|
||||||
|
@ -230,19 +230,16 @@ class Logger:
|
||||||
kind_col, show_col = self.convert_human_values_to_db_api_values(kind,
|
kind_col, show_col = self.convert_human_values_to_db_api_values(kind,
|
||||||
show)
|
show)
|
||||||
|
|
||||||
|
if not show_col: # unknown show
|
||||||
|
return
|
||||||
|
|
||||||
# now we may have need to do extra care for some values in columns
|
# now we may have need to do extra care for some values in columns
|
||||||
if kind == 'status': # we store (not None) time, jid, show, msg
|
if kind == 'status': # we store (not None) time, jid, show, msg
|
||||||
# status for roster items
|
# status for roster items
|
||||||
if show is None:
|
|
||||||
show_col = constants.SHOW_ONLINE
|
|
||||||
|
|
||||||
jid_id = self.get_jid_id(jid)
|
jid_id = self.get_jid_id(jid)
|
||||||
|
|
||||||
elif kind == 'gcstatus':
|
elif kind == 'gcstatus':
|
||||||
# status in ROOM (for pm status see status)
|
# status in ROOM (for pm status see status)
|
||||||
if show is None:
|
|
||||||
show_col = constants.SHOW_ONLINE
|
|
||||||
|
|
||||||
jid, nick = jid.split('/', 1)
|
jid, nick = jid.split('/', 1)
|
||||||
jid_id = self.get_jid_id(jid, 'ROOM') # re-get jid_id for the new jid
|
jid_id = self.get_jid_id(jid, 'ROOM') # re-get jid_id for the new jid
|
||||||
contact_name_col = nick
|
contact_name_col = nick
|
||||||
|
|
Loading…
Reference in New Issue