Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gajim
gajim
Commits
525010fc
Commit
525010fc
authored
Sep 03, 2015
by
Yann Leboulanger
Browse files
don't fail when we receive a MAM message without a body. Fixes #8140
parent
d111a415
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/common/logger.py
View file @
525010fc
...
...
@@ -1103,21 +1103,22 @@ def save_if_not_exists(self, with_, direction, tim, msg='', nick=None):
time_col
=
int
(
float
(
time
.
mktime
(
tim
)))
else
:
time_col
=
int
(
float
(
time
.
time
()))
if
msg
:
if
self
.
jid_is_from_pm
(
with_
)
or
nick
:
# It's a groupchat message
if
nick
:
# It's a message from a groupchat occupent
type_
=
'gc_msg'
with_
=
with_
+
'/'
+
nick
else
:
# It's a server message message, we don't log them
return
if
not
msg
:
return
if
self
.
jid_is_from_pm
(
with_
)
or
nick
:
# It's a groupchat message
if
nick
:
# It's a message from a groupchat occupent
type_
=
'gc_msg'
with_
=
with_
+
'/'
+
nick
else
:
if
direction
==
'from'
:
type_
=
'chat_msg_recv'
elif
direction
==
'to'
:
type_
=
'chat_msg_sent'
# It's a server message message, we don't log them
return
else
:
if
direction
==
'from'
:
type_
=
'chat_msg_recv'
elif
direction
==
'to'
:
type_
=
'chat_msg_sent'
jid_id
=
self
.
get_jid_id
(
with_
)
where_sql
=
'jid_id = %s AND message=?'
%
jid_id
if
type_
==
'gc_msg'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment