Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
poezio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
203
Issues
203
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poezio
poezio
Commits
184f354e
Commit
184f354e
authored
Jan 30, 2021
by
mathieui
Committed by
Link Mauve
Feb 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
muc: remove get_room_form hack and callbacks
parent
341c770b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
25 deletions
+8
-25
poezio/fixes.py
poezio/fixes.py
+0
-17
poezio/tabs/muctab.py
poezio/tabs/muctab.py
+8
-8
No files found.
poezio/fixes.py
View file @
184f354e
...
...
@@ -26,23 +26,6 @@ def has_identity(xmpp, jid, identity, on_true=None, on_false=None):
xmpp
.
plugin
[
'xep_0030'
].
get_info
(
jid
=
jid
,
callback
=
_cb
)
def
get_room_form
(
xmpp
:
ClientXMPP
,
room
:
str
,
callback
:
Callable
[[
Iq
],
Any
]):
def
_cb
(
result
):
if
result
[
"type"
]
==
"error"
:
return
callback
(
None
)
xform
=
result
.
xml
.
find
(
'{http://jabber.org/protocol/muc#owner}query/{jabber:x:data}x'
)
if
xform
is
None
:
return
callback
(
None
)
form
=
xmpp
.
plugin
[
'xep_0004'
].
build_form
(
xform
)
return
callback
(
form
)
iq
=
xmpp
.
make_iq_get
(
ito
=
room
)
query
=
ET
.
Element
(
'{http://jabber.org/protocol/muc#owner}query'
)
iq
.
append
(
query
)
iq
.
send
(
callback
=
_cb
)
def
_filter_add_receipt_request
(
self
,
stanza
):
"""
Auto add receipt requests to outgoing messages, if:
...
...
poezio/tabs/muctab.py
View file @
184f354e
...
...
@@ -1404,19 +1404,19 @@ class MucTab(ChatTab):
self
.
core
.
information
(
"Unknown user: %s"
%
nick
,
"Error"
)
@
command_args_parser
.
quoted
(
0
)
def
command_configure
(
self
,
ignored
:
Any
)
->
None
:
async
def
command_configure
(
self
,
ignored
:
Any
)
->
None
:
"""
/configure
"""
def
on_form_received
(
form
:
Form
)
->
None
:
if
not
form
:
try
:
form
=
await
self
.
core
.
xmpp
.
plugin
[
'xep_0045'
].
get_room_config
(
self
.
jid
.
bare
)
self
.
core
.
open_new_form
(
form
,
self
.
cancel_config
,
self
.
send_config
)
except
(
IqError
,
IqTimeout
,
ValueError
):
self
.
core
.
information
(
'Could not retrieve the configuration form'
,
'Error'
)
return
self
.
core
.
open_new_form
(
form
,
self
.
cancel_config
,
self
.
send_config
)
fixes
.
get_room_form
(
self
.
core
.
xmpp
,
self
.
jid
.
bare
,
on_form_received
)
@
command_args_parser
.
raw
def
command_cycle
(
self
,
msg
:
str
)
->
None
:
...
...
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