Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
80f0004e
Commit
80f0004e
authored
Aug 01, 2016
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save xcap operations in the journal while an account is disabled
parent
94533e56
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
presence.py
blink/presence.py
+3
-3
No files found.
blink/presence.py
View file @
80f0004e
...
@@ -178,13 +178,13 @@ class PresencePublicationHandler(object):
...
@@ -178,13 +178,13 @@ class PresencePublicationHandler(object):
if
notification
.
sender
is
BlinkSettings
():
if
notification
.
sender
is
BlinkSettings
():
account_manager
=
AccountManager
()
account_manager
=
AccountManager
()
if
'presence.offline_note'
in
notification
.
data
.
modified
:
if
'presence.offline_note'
in
notification
.
data
.
modified
:
for
account
in
(
account
for
account
in
account_manager
.
get_accounts
()
if
account
.
enabled
and
account
.
xcap_available
):
for
account
in
(
account
for
account
in
account_manager
.
get_accounts
()
if
account
.
xcap_available
):
state
=
BlinkPresenceState
(
account
)
.
offline_state
state
=
BlinkPresenceState
(
account
)
.
offline_state
account
.
xcap_manager
.
set_offline_status
(
OfflineStatus
(
state
)
if
state
is
not
None
else
None
)
account
.
xcap_manager
.
set_offline_status
(
OfflineStatus
(
state
)
if
state
is
not
None
else
None
)
if
'presence.icon'
in
notification
.
data
.
modified
:
if
'presence.icon'
in
notification
.
data
.
modified
:
icon_data
=
IconManager
()
.
get_image
(
'avatar'
)
icon_data
=
IconManager
()
.
get_image
(
'avatar'
)
icon
=
Icon
(
icon_data
,
'image/png'
)
if
icon_data
is
not
None
else
None
icon
=
Icon
(
icon_data
,
'image/png'
)
if
icon_data
is
not
None
else
None
for
account
in
(
account
for
account
in
account_manager
.
get_accounts
()
if
account
.
enabled
and
account
.
xcap_available
):
for
account
in
(
account
for
account
in
account_manager
.
get_accounts
()
if
account
.
xcap_available
):
account
.
xcap_manager
.
set_status_icon
(
icon
)
account
.
xcap_manager
.
set_status_icon
(
icon
)
if
'presence.current_state'
in
notification
.
data
.
modified
:
if
'presence.current_state'
in
notification
.
data
.
modified
:
for
account
in
(
account
for
account
in
account_manager
.
get_accounts
()
if
account
.
enabled
and
account
.
presence
.
enabled
):
for
account
in
(
account
for
account
in
account_manager
.
get_accounts
()
if
account
.
enabled
and
account
.
presence
.
enabled
):
...
@@ -196,7 +196,7 @@ class PresencePublicationHandler(object):
...
@@ -196,7 +196,7 @@ class PresencePublicationHandler(object):
account
.
save
()
account
.
save
()
elif
{
'presence.enabled'
,
'display_name'
,
'xcap.icon'
}
.
intersection
(
notification
.
data
.
modified
)
and
account
.
presence
.
enabled
:
elif
{
'presence.enabled'
,
'display_name'
,
'xcap.icon'
}
.
intersection
(
notification
.
data
.
modified
)
and
account
.
presence
.
enabled
:
account
.
presence_state
=
BlinkPresenceState
(
account
)
.
online_state
account
.
presence_state
=
BlinkPresenceState
(
account
)
.
online_state
if
account
.
enabled
and
account
.
xcap_available
and
(
set
(
notification
.
data
.
modified
)
!=
{
'xcap.icon'
}
or
account
.
id
in
self
.
_should_set_offline_status
):
if
account
.
xcap_available
and
(
set
(
notification
.
data
.
modified
)
!=
{
'xcap.icon'
}
or
account
.
id
in
self
.
_should_set_offline_status
):
state
=
BlinkPresenceState
(
account
)
.
offline_state
state
=
BlinkPresenceState
(
account
)
.
offline_state
account
.
xcap_manager
.
set_offline_status
(
OfflineStatus
(
state
)
if
state
is
not
None
else
None
)
account
.
xcap_manager
.
set_offline_status
(
OfflineStatus
(
state
)
if
state
is
not
None
else
None
)
if
account
.
id
in
self
.
_should_set_offline_status
:
# do not use set.discard() here to avoid race conditions. it should only be removed if present.
if
account
.
id
in
self
.
_should_set_offline_status
:
# do not use set.discard() here to avoid race conditions. it should only be removed if present.
...
...
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