Skip to content

Commit

Permalink
core: fix adding bogus bookmark
Browse files Browse the repository at this point in the history
  • Loading branch information
truenicoco committed Apr 14, 2023
1 parent 93450ed commit a5729b8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions slidge/core/muc/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,11 +781,6 @@ async def add_to_bookmarks(self, auto_join=True, invite=False, preserve=True):
"""
item = Item()
item["id"] = self.jid
if self.jid.local == "":
self.log.error(
"Tried to add a bookmark without a local part", exc_info=True
)
return

iq = Iq(stype="get", sfrom=self.user.jid, sto=self.user.jid)
iq["pubsub"]["items"]["node"] = self.xmpp["xep_0402"].stanza.NS
Expand All @@ -799,6 +794,7 @@ async def add_to_bookmarks(self, auto_join=True, invite=False, preserve=True):
# this below creates the item if it wasn't here already
# (slixmpp annoying magic)
item = ans["pubsub"]["items"]["item"]
item["id"] = self.jid
except IqError:
item["conference"]["name"] = self.name
item["conference"]["autojoin"] = auto_join
Expand Down

0 comments on commit a5729b8

Please sign in to comment.