Fix saving MUC-PMs

If the JID is not in the DB we need a type to insert
This commit is contained in:
Philipp Hörist 2017-10-29 00:34:43 +02:00
parent 6a8bbe7e71
commit 0490414079
1 changed files with 5 additions and 1 deletions

View File

@ -290,13 +290,17 @@ class Logger:
:param jid: The JID
:param type_: The JIDConstant type
:param kind: The KindConstant
:param type_: The JIDConstant
return the jid id
"""
if kind in (KindConstant.GC_MSG, KindConstant.GCSTATUS):
type_ = JIDConstant.ROOM_TYPE
elif kind is not None:
type_ = JIDConstant.NORMAL_TYPE
result = self._jid_ids.get(jid, None)
if result is not None: