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
d5d21397
Commit
d5d21397
authored
Aug 30, 2022
by
Tijmen de Mes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed got message event to allow for more arguments
parent
4b03268b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
chatwindow.py
blink/chatwindow.py
+5
-5
messages.py
blink/messages.py
+2
-2
No files found.
blink/chatwindow.py
View file @
d5d21397
...
...
@@ -2380,12 +2380,12 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
def
_NH_BlinkGotMessage
(
self
,
notification
):
blink_session
=
notification
.
sender
session
=
blink_session
.
items
.
chat
message
=
notification
.
data
if
session
is
None
:
return
message
=
notification
.
data
.
message
direction
=
notification
.
data
.
message
.
direction
encrypted
=
False
if
message
.
content_type
.
startswith
(
'image/'
):
content
=
'''<img src="data:{};base64,{}" class="scaled-to-fit" />'''
.
format
(
message
.
content_type
,
message
.
content
.
decode
(
'base64'
)
.
rstrip
())
...
...
@@ -2421,10 +2421,10 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
self
.
pending_decryption
.
remove
(
message
)
session
.
chat_widget
.
update_message_text
(
message
.
id
,
content
)
else
:
session
.
chat_widget
.
add_message
(
ChatMessage
(
content
,
sender
,
'incoming'
,
id
=
message
.
id
))
session
.
chat_widget
.
add_message
(
ChatMessage
(
content
,
sender
,
direction
,
id
=
message
.
id
))
session
.
chat_widget
.
update_message_encryption
(
message
.
id
,
message
.
is_secure
)
else
:
self
.
render_after_load
.
append
(
ChatMessage
(
content
,
sender
,
'incoming'
,
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
self
.
selected_session
.
blink_session
is
blink_session
and
not
self
.
isMinimized
()
and
self
.
isActiveWindow
():
...
...
blink/messages.py
View file @
d5d21397
...
...
@@ -585,8 +585,8 @@ class MessageManager(object, metaclass=Singleton):
print
(
"-- Should send delivered imdn"
)
self
.
send_imdn_message
(
session
,
message
.
id
,
message
.
timestamp
,
'delivered'
)
notification_center
.
post_notification
(
'BlinkGotMessage'
,
sender
=
session
,
data
=
message
)
self
.
_add_contact_to_messages_group
(
session
.
account
,
session
.
contact
)
notification_center
.
post_notification
(
'BlinkGotMessage'
,
sender
=
session
,
data
=
NotificationData
(
message
=
message
))
def
_send_message
(
self
,
outgoing_message
):
self
.
_outgoing_message_queue
.
append
(
outgoing_message
)
...
...
@@ -846,7 +846,7 @@ class MessageManager(object, metaclass=Singleton):
self
.
_add_contact_to_messages_group
(
blink_session
.
account
,
blink_session
.
contact
)
notification_center
.
post_notification
(
'BlinkGotMessage'
,
sender
=
blink_session
,
data
=
message
)
data
=
NotificationData
(
message
=
message
)
)
return
self
.
_handle_incoming_message
(
message
,
blink_session
,
account
)
...
...
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