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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
eta
gajim
Commits
a1102880
Commit
a1102880
authored
18 years ago
by
nkour
Browse files
Options
Downloads
Patches
Plain Diff
intro is_hidden_from_roster and is_observer
parent
aae7e7e9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/common/contacts.py
+20
-0
20 additions, 0 deletions
src/common/contacts.py
with
20 additions
and
0 deletions
src/common/contacts.py
+
20
−
0
View file @
a1102880
...
...
@@ -67,6 +67,26 @@ class Contact:
return
self
.
name
return
self
.
jid
.
split
(
'
@
'
)[
0
]
def
is_hidden_from_roster
(
self
):
'''
if roster should not be visible in roster
'''
# JEP-0162
hide
=
True
if
contact
.
sub
in
(
'
both
'
,
'
to
'
,
'
from
'
):
hide
=
False
elif
contact
.
ask
==
'
subscribe
'
:
hide
=
False
elif
contact
.
name
or
len
(
contact
.
groups
):
hide
=
False
return
hide
def
is_observer
(
self
):
# XEP-0162: http://www.xmpp.org/extensions/xep-0162.html
is_observer
=
False
if
is_hidden_in_roster
()
and
if
contact
.
sub
==
'
from
'
:
is_observer
=
True
return
is_observer
class
GC_Contact
:
'''
Information concerning each groupchat contact
'''
def
__init__
(
self
,
room_jid
=
''
,
name
=
''
,
show
=
''
,
status
=
''
,
role
=
''
,
...
...
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