Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mesonium
gajim
Commits
3dfb991d
Commit
3dfb991d
authored
4 years ago
by
Philipp Hörist
Browse files
Options
Downloads
Patches
Plain Diff
Bookmarks: Check for config-node-max feature
Fixes #10425
parent
3680b883
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gajim/common/modules/bookmarks.py
+9
-1
9 additions, 1 deletion
gajim/common/modules/bookmarks.py
with
9 additions
and
1 deletion
gajim/common/modules/bookmarks.py
+
9
−
1
View file @
3dfb991d
...
...
@@ -35,6 +35,9 @@
from
gajim.common.modules.util
import
event_node
NODE_MAX_NS
=
'
http://jabber.org/protocol/pubsub#config-node-max
'
class
Bookmarks
(
BaseModule
):
def
__init__
(
self
,
con
):
BaseModule
.
__init__
(
self
,
con
)
...
...
@@ -43,6 +46,7 @@ def __init__(self, con):
self
.
_conversion
=
False
self
.
_compat
=
False
self
.
_compat_pep
=
False
self
.
_node_max
=
False
self
.
_bookmarks
=
{}
self
.
_join_timeouts
=
[]
self
.
_request_in_progress
=
True
...
...
@@ -132,6 +136,7 @@ def _bookmark_1_event_received(self, _con, _stanza, properties):
NetworkEvent
(
'
bookmarks-received
'
,
account
=
self
.
_account
))
def
pass_disco
(
self
,
info
):
self
.
_node_max
=
NODE_MAX_NS
in
info
.
features
self
.
_compat_pep
=
Namespace
.
BOOKMARKS_COMPAT_PEP
in
info
.
features
self
.
_compat
=
Namespace
.
BOOKMARKS_COMPAT
in
info
.
features
self
.
_conversion
=
Namespace
.
BOOKMARK_CONVERSION
in
info
.
features
...
...
@@ -141,7 +146,10 @@ def _bookmark_module(self):
if
not
self
.
_con
.
get_module
(
'
PubSub
'
).
publish_options
:
return
'
PrivateBookmarks
'
if
app
.
settings
.
get
(
'
dev_force_bookmark_2
'
)
or
self
.
_compat_pep
:
if
app
.
settings
.
get
(
'
dev_force_bookmark_2
'
):
return
'
NativeBookmarks
'
if
self
.
_compat_pep
and
self
.
_node_max
:
return
'
NativeBookmarks
'
if
self
.
_conversion
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment