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
da232c8a
Commit
da232c8a
authored
Aug 30, 2022
by
Tijmen de Mes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't send IMDN for outgoing messages
parent
d5d21397
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
8 deletions
+20
-8
chatwindow.py
blink/chatwindow.py
+2
-2
history.py
blink/history.py
+6
-2
messages.py
blink/messages.py
+12
-4
No files found.
blink/chatwindow.py
View file @
da232c8a
...
@@ -2426,7 +2426,7 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
...
@@ -2426,7 +2426,7 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
else
:
else
:
self
.
render_after_load
.
append
(
ChatMessage
(
content
,
sender
,
direction
,
id
=
message
.
id
))
self
.
render_after_load
.
append
(
ChatMessage
(
content
,
sender
,
direction
,
id
=
message
.
id
))
if
message
.
disposition
is
not
None
and
'display'
in
message
.
disposition
and
not
encrypted
:
if
direction
!=
'outgoing'
and
message
.
disposition
is
not
None
and
'display'
in
message
.
disposition
and
not
encrypted
:
if
self
.
selected_session
.
blink_session
is
blink_session
and
not
self
.
isMinimized
()
and
self
.
isActiveWindow
():
if
self
.
selected_session
.
blink_session
is
blink_session
and
not
self
.
isMinimized
()
and
self
.
isActiveWindow
():
MessageManager
()
.
send_imdn_message
(
blink_session
,
message
.
id
,
message
.
timestamp
,
'displayed'
,
account
)
MessageManager
()
.
send_imdn_message
(
blink_session
,
message
.
id
,
message
.
timestamp
,
'displayed'
,
account
)
else
:
else
:
...
@@ -2496,7 +2496,7 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
...
@@ -2496,7 +2496,7 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
account_manager
=
AccountManager
()
account_manager
=
AccountManager
()
account
=
account_manager
.
get_account
(
message
.
account_id
)
if
account_manager
.
has_account
(
message
.
account_id
)
else
None
account
=
account_manager
.
get_account
(
message
.
account_id
)
if
account_manager
.
has_account
(
message
.
account_id
)
else
None
if
message
.
state
!=
'displayed'
and
'display'
in
message
.
disposition
:
if
message
.
direction
!=
'outgoing'
and
message
.
state
!=
'displayed'
and
'display'
in
message
.
disposition
:
if
message
.
state
!=
'delivered'
and
'positive-delivery'
in
message
.
disposition
:
if
message
.
state
!=
'delivered'
and
'positive-delivery'
in
message
.
disposition
:
MessageManager
()
.
send_imdn_message
(
blink_session
,
message
.
message_id
,
message
.
timestamp
,
'delivered'
,
account
)
MessageManager
()
.
send_imdn_message
(
blink_session
,
message
.
message_id
,
message
.
timestamp
,
'delivered'
,
account
)
...
...
blink/history.py
View file @
da232c8a
...
@@ -434,7 +434,11 @@ class MessageHistory(object, metaclass=Singleton):
...
@@ -434,7 +434,11 @@ class MessageHistory(object, metaclass=Singleton):
except
IndexError
:
except
IndexError
:
pass
pass
else
:
else
:
# print(f'-- Updating {id} {message.state} -> {state}')
if
message
.
direction
==
'outgoing'
and
state
==
'received'
:
return
if
message
.
state
!=
'displayed'
and
message
.
state
!=
state
:
# print(f'-- Updating {message.direction} {id} {message.state} -> {state}')
message
.
state
=
state
message
.
state
=
state
@
run_in_thread
(
'db'
)
@
run_in_thread
(
'db'
)
...
...
blink/messages.py
View file @
da232c8a
...
@@ -333,7 +333,7 @@ class OutgoingMessage(object):
...
@@ -333,7 +333,7 @@ class OutgoingMessage(object):
@
property
@
property
def
message
(
self
):
def
message
(
self
):
return
BlinkMessage
(
self
.
content
,
self
.
content_type
,
self
.
account
,
timestamp
=
self
.
timestamp
,
id
=
self
.
id
,
is_secure
=
self
.
is_secure
)
return
BlinkMessage
(
self
.
content
,
self
.
content_type
,
self
.
account
,
timestamp
=
self
.
timestamp
,
id
=
self
.
id
,
is_secure
=
self
.
is_secure
,
direction
=
'outgoing'
)
def
_lookup
(
self
):
def
_lookup
(
self
):
settings
=
SIPSimpleSettings
()
settings
=
SIPSimpleSettings
()
...
@@ -581,7 +581,7 @@ class MessageManager(object, metaclass=Singleton):
...
@@ -581,7 +581,7 @@ class MessageManager(object, metaclass=Singleton):
if
account
is
session
.
account
:
if
account
is
session
.
account
:
notification_center
.
post_notification
(
'BlinkMessageIsParsed'
,
sender
=
session
,
data
=
message
)
notification_center
.
post_notification
(
'BlinkMessageIsParsed'
,
sender
=
session
,
data
=
message
)
if
message
is
not
None
and
'positive-delivery'
in
message
.
disposition
:
if
message
is
not
None
and
message
.
direction
!=
'outgoing'
and
'positive-delivery'
in
message
.
disposition
:
print
(
"-- Should send delivered imdn"
)
print
(
"-- Should send delivered imdn"
)
self
.
send_imdn_message
(
session
,
message
.
id
,
message
.
timestamp
,
'delivered'
)
self
.
send_imdn_message
(
session
,
message
.
id
,
message
.
timestamp
,
'delivered'
)
...
@@ -902,9 +902,17 @@ class MessageManager(object, metaclass=Singleton):
...
@@ -902,9 +902,17 @@ class MessageManager(object, metaclass=Singleton):
def
_NH_PGPMessageDidNotDecrypt
(
self
,
notification
):
def
_NH_PGPMessageDidNotDecrypt
(
self
,
notification
):
session
=
notification
.
sender
session
=
notification
.
sender
data
=
notification
.
data
.
message
message
=
notification
.
data
.
message
self
.
send_imdn_message
(
session
,
data
.
message_id
,
data
.
timestamp
,
'error'
)
if
message
.
direction
==
'outgoing'
:
return
try
:
msg_id
=
message
.
message_id
except
AttributeError
:
msg_id
=
message
.
id
self
.
send_imdn_message
(
session
,
msg_id
,
message
.
timestamp
,
'error'
)
def
export_private_key
(
self
,
account
):
def
export_private_key
(
self
,
account
):
if
account
is
None
:
if
account
is
None
:
...
...
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