Make jid_is_from_pm works with not-full jid
This commit is contained in:
parent
624a16034e
commit
88db86bb99
|
@ -158,8 +158,12 @@ class Logger:
|
|||
(user will see the first pm as if it was message in room's public chat)
|
||||
and after that all okay'''
|
||||
|
||||
possible_room_jid, possible_nick = jid.split('/', 1)
|
||||
return self.jid_is_room_jid(possible_room_jid)
|
||||
if jid.find('/') > -1:
|
||||
possible_room_jid, possible_nick = jid.split('/', 1)
|
||||
return self.jid_is_room_jid(possible_room_jid)
|
||||
else:
|
||||
# it's not a full jid, so it's not a pm one
|
||||
return False
|
||||
|
||||
def jid_is_room_jid(self, jid):
|
||||
self.cur.execute('SELECT jid_id FROM jids WHERE jid=? AND type=?',
|
||||
|
|
Loading…
Reference in New Issue