Commit 8826df91 authored by Yann Leboulanger's avatar Yann Leboulanger

prevent some tracebacks

parent c1514e97
......@@ -2874,6 +2874,8 @@ def send_invite(self, room, to, reason='', continue_tag=False):
"""
Send invitation
"""
if not gajim.account_is_connected(self.name):
return
contact = gajim.contacts.get_contact_from_full_jid(self.name, to)
if contact and contact.supports(nbxmpp.NS_CONFERENCE):
# send direct invite
......@@ -2900,6 +2902,8 @@ def decline_invitation(self, room, to, reason=''):
"""
decline a groupchat invitation
"""
if not gajim.account_is_connected(self.name):
return
message=nbxmpp.Message(to=room)
c = message.addChild(name='x', namespace=nbxmpp.NS_MUC_USER)
c = c.addChild(name='decline', attrs={'to': to})
......@@ -2911,6 +2915,8 @@ def request_voice(self, room):
"""
Request voice in a moderated room
"""
if not gajim.account_is_connected(self.name):
return
message = nbxmpp.Message(to=room)
x = nbxmpp.DataForm(typ='submit')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment