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
8bda3a55
"README.md" did not exist on "02009620162ea4ed83bd8b655dd515969eff0262"
Commit
8bda3a55
authored
16 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
upadte all contact instances when we get a pep event for a contact. See #3953
parent
e2f98ad2
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/pep.py
+71
-79
71 additions, 79 deletions
src/common/pep.py
with
71 additions
and
79 deletions
src/common/pep.py
+
71
−
79
View file @
8bda3a55
...
...
@@ -35,23 +35,21 @@ def user_mood(items, name, jid):
del
acc
.
mood
[
'
text
'
]
(
user
,
resource
)
=
gajim
.
get_room_and_nick_from_fjid
(
jid
)
contact
=
gajim
.
contacts
.
get_contact
(
name
,
user
,
resource
=
resource
)
if
not
contact
:
return
if
has_child
:
if
contact
.
mood
.
has_key
(
'
mood
'
):
del
contact
.
mood
[
'
mood
'
]
if
contact
.
mood
.
has_key
(
'
text
'
):
del
contact
.
mood
[
'
text
'
]
if
mood
is
not
None
:
contact
.
mood
[
'
mood
'
]
=
mood
if
text
is
not
None
:
contact
.
mood
[
'
text
'
]
=
text
elif
retract
:
if
contact
.
mood
.
has_key
(
'
mood
'
):
del
contact
.
mood
[
'
mood
'
]
if
contact
.
mood
.
has_key
(
'
text
'
):
del
contact
.
mood
[
'
text
'
]
for
contact
in
gajim
.
contacts
.
get_contacts
(
name
,
user
)
if
has_child
:
if
contact
.
mood
.
has_key
(
'
mood
'
):
del
contact
.
mood
[
'
mood
'
]
if
contact
.
mood
.
has_key
(
'
text
'
):
del
contact
.
mood
[
'
text
'
]
if
mood
is
not
None
:
contact
.
mood
[
'
mood
'
]
=
mood
if
text
is
not
None
:
contact
.
mood
[
'
text
'
]
=
text
elif
retract
:
if
contact
.
mood
.
has_key
(
'
mood
'
):
del
contact
.
mood
[
'
mood
'
]
if
contact
.
mood
.
has_key
(
'
text
'
):
del
contact
.
mood
[
'
text
'
]
def
user_tune
(
items
,
name
,
jid
):
has_child
=
False
...
...
@@ -116,41 +114,39 @@ def user_tune(items, name, jid):
del
acc
.
tune
[
'
length
'
]
(
user
,
resource
)
=
gajim
.
get_room_and_nick_from_fjid
(
jid
)
contact
=
gajim
.
contacts
.
get_contact
(
name
,
user
,
resource
=
resource
)
if
not
contact
:
return
if
has_child
:
if
contact
.
tune
.
has_key
(
'
artist
'
):
del
contact
.
tune
[
'
artist
'
]
if
contact
.
tune
.
has_key
(
'
title
'
):
del
contact
.
tune
[
'
title
'
]
if
contact
.
tune
.
has_key
(
'
source
'
):
del
contact
.
tune
[
'
source
'
]
if
contact
.
tune
.
has_key
(
'
track
'
):
del
contact
.
tune
[
'
track
'
]
if
contact
.
tune
.
has_key
(
'
length
'
):
del
contact
.
tune
[
'
length
'
]
if
artist
is
not
None
:
contact
.
tune
[
'
artist
'
]
=
artist
if
title
is
not
None
:
contact
.
tune
[
'
title
'
]
=
title
if
source
is
not
None
:
contact
.
tune
[
'
source
'
]
=
source
if
track
is
not
None
:
contact
.
tune
[
'
track
'
]
=
track
if
length
is
not
None
:
contact
.
tune
[
'
length
'
]
=
length
elif
retract
:
if
contact
.
tune
.
has_key
(
'
artist
'
):
del
contact
.
tune
[
'
artist
'
]
if
contact
.
tune
.
has_key
(
'
title
'
):
del
contact
.
tune
[
'
title
'
]
if
contact
.
tune
.
has_key
(
'
source
'
):
del
contact
.
tune
[
'
source
'
]
if
contact
.
tune
.
has_key
(
'
track
'
):
del
contact
.
tune
[
'
track
'
]
if
contact
.
tune
.
has_key
(
'
length
'
):
del
contact
.
tune
[
'
length
'
]
for
contact
in
gajim
.
contacts
.
get_contacts
(
name
,
user
)
if
has_child
:
if
contact
.
tune
.
has_key
(
'
artist
'
):
del
contact
.
tune
[
'
artist
'
]
if
contact
.
tune
.
has_key
(
'
title
'
):
del
contact
.
tune
[
'
title
'
]
if
contact
.
tune
.
has_key
(
'
source
'
):
del
contact
.
tune
[
'
source
'
]
if
contact
.
tune
.
has_key
(
'
track
'
):
del
contact
.
tune
[
'
track
'
]
if
contact
.
tune
.
has_key
(
'
length
'
):
del
contact
.
tune
[
'
length
'
]
if
artist
is
not
None
:
contact
.
tune
[
'
artist
'
]
=
artist
if
title
is
not
None
:
contact
.
tune
[
'
title
'
]
=
title
if
source
is
not
None
:
contact
.
tune
[
'
source
'
]
=
source
if
track
is
not
None
:
contact
.
tune
[
'
track
'
]
=
track
if
length
is
not
None
:
contact
.
tune
[
'
length
'
]
=
length
elif
retract
:
if
contact
.
tune
.
has_key
(
'
artist
'
):
del
contact
.
tune
[
'
artist
'
]
if
contact
.
tune
.
has_key
(
'
title
'
):
del
contact
.
tune
[
'
title
'
]
if
contact
.
tune
.
has_key
(
'
source
'
):
del
contact
.
tune
[
'
source
'
]
if
contact
.
tune
.
has_key
(
'
track
'
):
del
contact
.
tune
[
'
track
'
]
if
contact
.
tune
.
has_key
(
'
length
'
):
del
contact
.
tune
[
'
length
'
]
def
user_geoloc
(
items
,
name
,
jid
):
pass
...
...
@@ -200,29 +196,27 @@ def user_activity(items, name, jid):
del
acc
.
activity
[
'
text
'
]
(
user
,
resource
)
=
gajim
.
get_room_and_nick_from_fjid
(
jid
)
contact
=
gajim
.
contacts
.
get_contact
(
name
,
user
,
resource
=
resource
)
if
not
contact
:
return
if
has_child
:
if
contact
.
activity
.
has_key
(
'
activity
'
):
del
contact
.
activity
[
'
activity
'
]
if
contact
.
activity
.
has_key
(
'
subactivity
'
):
del
contact
.
activity
[
'
subactivity
'
]
if
contact
.
activity
.
has_key
(
'
text
'
):
del
contact
.
activity
[
'
text
'
]
if
activity
is
not
None
:
contact
.
activity
[
'
activity
'
]
=
activity
if
subactivity
is
not
None
:
contact
.
activity
[
'
subactivity
'
]
=
subactivity
if
text
is
not
None
:
contact
.
activity
[
'
text
'
]
=
text
elif
retract
:
if
contact
.
activity
.
has_key
(
'
activity
'
):
del
contact
.
activity
[
'
activity
'
]
if
contact
.
activity
.
has_key
(
'
subactivity
'
):
del
contact
.
activity
[
'
subactivity
'
]
if
contact
.
activity
.
has_key
(
'
text
'
):
del
contact
.
activity
[
'
text
'
]
for
contact
in
gajim
.
contacts
.
get_contacts
(
name
,
user
)
if
has_child
:
if
contact
.
activity
.
has_key
(
'
activity
'
):
del
contact
.
activity
[
'
activity
'
]
if
contact
.
activity
.
has_key
(
'
subactivity
'
):
del
contact
.
activity
[
'
subactivity
'
]
if
contact
.
activity
.
has_key
(
'
text
'
):
del
contact
.
activity
[
'
text
'
]
if
activity
is
not
None
:
contact
.
activity
[
'
activity
'
]
=
activity
if
subactivity
is
not
None
:
contact
.
activity
[
'
subactivity
'
]
=
subactivity
if
text
is
not
None
:
contact
.
activity
[
'
text
'
]
=
text
elif
retract
:
if
contact
.
activity
.
has_key
(
'
activity
'
):
del
contact
.
activity
[
'
activity
'
]
if
contact
.
activity
.
has_key
(
'
subactivity
'
):
del
contact
.
activity
[
'
subactivity
'
]
if
contact
.
activity
.
has_key
(
'
text
'
):
del
contact
.
activity
[
'
text
'
]
def
user_nickname
(
items
,
name
,
jid
):
has_child
=
False
...
...
@@ -246,12 +240,10 @@ def user_nickname(items, name, jid):
gajim
.
nicks
[
name
]
=
gajim
.
config
.
get_per
(
'
accounts
'
,
name
,
'
name
'
)
(
user
,
resource
)
=
gajim
.
get_room_and_nick_from_fjid
(
jid
)
contact
=
gajim
.
contacts
.
get_contact
(
name
,
user
,
resource
=
resource
)
if
not
contact
:
return
if
has_child
:
if
nick
is
not
None
:
contact
.
contact_name
=
nick
for
contact
in
gajim
.
contacts
.
get_contacts
(
name
,
user
)
contact
.
contact_name
=
nick
gajim
.
interface
.
roster
.
draw_contact
(
user
,
name
)
for
ctrl
in
gajim
.
interface
.
msg_win_mgr
.
get_chat_controls
(
user
,
name
):
ctrl
.
update_ui
()
...
...
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