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
P
python-nbxmpp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gajim
python-nbxmpp
Commits
225bfb59
Commit
225bfb59
authored
Nov 17, 2020
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UserNickame: Add option to make node public
parent
fda964ed
Pipeline
#6745
passed with stages
in 1 minute and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
nbxmpp/modules/nickname.py
nbxmpp/modules/nickname.py
+13
-2
No files found.
nbxmpp/modules/nickname.py
View file @
225bfb59
...
...
@@ -91,13 +91,24 @@ class Nickname(BaseModule):
return
nickname
.
getData
()
or
None
@
iq_request_task
def
set_nickname
(
self
,
nickname
):
def
set_nickname
(
self
,
nickname
,
public
=
False
):
task
=
yield
access_model
=
'open'
if
public
else
'presence'
options
=
{
'pubsub#persist_items'
:
'true'
,
'pubsub#access_model'
:
access_model
,
}
item
=
Node
(
'nick'
,
{
'xmlns'
:
Namespace
.
NICK
})
if
nickname
is
not
None
:
item
.
addData
(
nickname
)
result
=
yield
self
.
publish
(
Namespace
.
NICK
,
item
,
id_
=
'current'
)
result
=
yield
self
.
publish
(
Namespace
.
NICK
,
item
,
id_
=
'current'
,
options
=
options
,
force_node_options
=
True
)
yield
finalize
(
task
,
result
)
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