Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Vladislav Rykov
THSO.server
Commits
e70a5d73
Commit
e70a5d73
authored
Jun 08, 2020
by
Vladislav Rykov
Browse files
notifications logic fixed
parent
9c0a1d47
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/app/helpers/notification_manager.py
View file @
e70a5d73
...
...
@@ -27,7 +27,7 @@ def listening():
d
=
json
.
loads
(
e
.
payload
)
dev
=
dd
.
get
(
d
[
'appkey'
],
d
[
'devid'
])[
1
]
d
[
'message'
][
'data'
]
=
ddm
.
read_data
(
unhexlify
(
d
[
'message'
][
'data'
][
2
:]),
dev
[
3
])
if
(
d
[
'op'
][
0
]
==
'O'
and
d
[
'lvalue'
]
in
d
[
'message'
][
'data'
]
)
or
eval
(
str
(
d
[
'message'
][
'data'
][
d
[
'lvalue'
]])
+
d
[
'op'
]
+
d
[
'rvalue'
]):
if
d
[
'lvalue'
]
in
d
[
'message'
][
'data'
]
and
(
d
[
'op'
][
0
]
==
'O'
or
eval
(
str
(
d
[
'message'
][
'data'
][
d
[
'lvalue'
]])
+
d
[
'op'
]
+
d
[
'rvalue'
])
)
:
if
d
[
'action_type'
]
==
'alert'
:
# send mail
n
=
nf
.
get
(
d
[
'appkey'
],
d
[
'devid'
],
d
[
'nfid'
])[
1
]
...
...
Write
Preview
Supports
Markdown
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