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
gajim
python-nbxmpp
Commits
4f890ee7
Commit
4f890ee7
authored
Mar 13, 2022
by
Philipp Hörist
Browse files
Roster: Add support for approved attribute
- Correct the default value for subscription
parent
d6974b2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
nbxmpp/structs.py
View file @
4f890ee7
...
...
@@ -367,6 +367,7 @@ class RosterItem:
name
:
Optional
[
str
]
=
None
ask
:
Optional
[
str
]
=
None
subscription
:
Optional
[
str
]
=
None
approved
:
Optional
[
str
]
=
None
groups
:
Set
[
str
]
=
field
(
default_factory
=
set
)
@
classmethod
...
...
@@ -382,7 +383,8 @@ class RosterItem:
return
cls
(
jid
=
jid
,
name
=
attrs
.
get
(
'name'
),
ask
=
attrs
.
get
(
'ask'
),
subscription
=
attrs
.
get
(
'subscription'
),
subscription
=
attrs
.
get
(
'subscription'
)
or
'none'
,
approved
=
attrs
.
get
(
'approved'
),
groups
=
groups
)
def
asdict
(
self
)
->
dict
[
str
,
Any
]:
...
...
@@ -390,6 +392,7 @@ class RosterItem:
'name'
:
self
.
name
,
'ask'
:
self
.
ask
,
'subscription'
:
self
.
subscription
,
'approved'
:
self
.
approved
,
'groups'
:
self
.
groups
}
...
...
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