Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
poezio
poezio
Commits
77d0a7a4
Commit
77d0a7a4
authored
Sep 21, 2016
by
Link Mauve
Browse files
multiuserchat: Use newer MUC plugin from slixmpp.
parent
9d983abd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
poezio/multiuserchat.py
poezio/multiuserchat.py
+3
-3
No files found.
poezio/multiuserchat.py
View file @
77d0a7a4
...
@@ -111,7 +111,7 @@ def join_groupchat(core, jid, nick, passwd='', status=None, show=None, seconds=N
...
@@ -111,7 +111,7 @@ def join_groupchat(core, jid, nick, passwd='', status=None, show=None, seconds=N
to
=
stanza
[
"to"
]
to
=
stanza
[
"to"
]
stanza
.
send
()
stanza
.
send
()
xmpp
.
plugin
[
'xep_0045'
].
rooms
[
jid
]
=
{}
xmpp
.
plugin
[
'xep_0045'
].
rooms
[
jid
]
=
{}
xmpp
.
plugin
[
'xep_0045'
].
our
N
icks
[
jid
]
=
to
.
resource
xmpp
.
plugin
[
'xep_0045'
].
our
_n
icks
[
jid
]
=
to
.
resource
def
leave_groupchat
(
xmpp
,
jid
,
own_nick
,
msg
):
def
leave_groupchat
(
xmpp
,
jid
,
own_nick
,
msg
):
"""
"""
...
@@ -119,7 +119,7 @@ def leave_groupchat(xmpp, jid, own_nick, msg):
...
@@ -119,7 +119,7 @@ def leave_groupchat(xmpp, jid, own_nick, msg):
"""
"""
jid
=
safeJID
(
jid
)
jid
=
safeJID
(
jid
)
try
:
try
:
xmpp
.
plugin
[
'xep_0045'
].
leave
MUC
(
jid
,
own_nick
,
msg
)
xmpp
.
plugin
[
'xep_0045'
].
leave
_muc
(
jid
,
own_nick
,
msg
)
except
KeyError
:
except
KeyError
:
log
.
debug
(
"muc.leave_groupchat: could not leave the room %s"
,
log
.
debug
(
"muc.leave_groupchat: could not leave the room %s"
,
jid
,
exc_info
=
True
)
jid
,
exc_info
=
True
)
...
@@ -169,7 +169,7 @@ def set_user_affiliation(xmpp, muc_jid, affiliation, nick=None, jid=None, reason
...
@@ -169,7 +169,7 @@ def set_user_affiliation(xmpp, muc_jid, affiliation, nick=None, jid=None, reason
if
callback
:
if
callback
:
return
iq
.
send
(
callback
=
callback
)
return
iq
.
send
(
callback
=
callback
)
try
:
try
:
return
xmpp
.
plugin
[
'xep_0045'
].
set
A
ffiliation
(
str
(
muc_jid
),
str
(
jid
)
if
jid
else
None
,
nick
,
affiliation
)
return
xmpp
.
plugin
[
'xep_0045'
].
set
_a
ffiliation
(
str
(
muc_jid
),
str
(
jid
)
if
jid
else
None
,
nick
,
affiliation
)
except
:
except
:
import
traceback
import
traceback
log
.
debug
(
'Error setting the affiliation: %s'
,
traceback
.
format_exc
())
log
.
debug
(
'Error setting the affiliation: %s'
,
traceback
.
format_exc
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment