plugin XEP-0045: raise a special error when the room has already been joined
This commit is contained in:
parent
923dcc593d
commit
67cf4c7913
1 changed files with 4 additions and 1 deletions
|
|
@ -60,6 +60,9 @@ class UnknownRoom(Exception):
|
|||
pass
|
||||
|
||||
|
||||
class AlreadyJoinedRoom(Exception):
|
||||
pass
|
||||
|
||||
class NotReadyYet(Exception):
|
||||
pass
|
||||
|
||||
|
|
@ -363,7 +366,7 @@ class XEP_0045(object):
|
|||
return _errDeferred()
|
||||
if room_jid in self.clients[profile].joined_rooms:
|
||||
log.warning(_(u'%(profile)s is already in room %(room_jid)s') % {'profile': profile, 'room_jid': room_jid.userhost()})
|
||||
return _errDeferred()
|
||||
return _errDeferred(AlreadyJoinedRoom, D_(u"The room has already been joined"))
|
||||
log.info(_(u"[%(profile)s] is joining room %(room)s with nick %(nick)s") % {'profile': profile, 'room': room_jid.userhost(), 'nick': nick})
|
||||
|
||||
if "history" in options:
|
||||
|
|
|
|||
Loading…
Reference in a new issue