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
4a912f46
Commit
4a912f46
authored
Mar 07, 2014
by
Saul Ibarra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed using correct avatar and display name for received messages
parent
13e4c2f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
chatwindow.py
blink/chatwindow.py
+7
-5
No files found.
blink/chatwindow.py
View file @
4a912f46
...
@@ -20,6 +20,7 @@ from lxml import etree
...
@@ -20,6 +20,7 @@ from lxml import etree
from
weakref
import
proxy
from
weakref
import
proxy
from
zope.interface
import
implements
from
zope.interface
import
implements
from
sipsimple.account
import
AccountManager
from
sipsimple.configuration.settings
import
SIPSimpleSettings
from
sipsimple.configuration.settings
import
SIPSimpleSettings
from
blink.configuration.datatypes
import
FileURL
from
blink.configuration.datatypes
import
FileURL
...
@@ -1148,15 +1149,16 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
...
@@ -1148,15 +1149,16 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
# TODO: add support for OTR -Saul
# TODO: add support for OTR -Saul
return
return
uri
=
'
%
s@
%
s'
%
(
message
.
sender
.
uri
.
user
,
message
.
sender
.
uri
.
host
)
uri
=
'
%
s@
%
s'
%
(
message
.
sender
.
uri
.
user
,
message
.
sender
.
uri
.
host
)
if
blink_session
.
account
.
id
==
uri
:
account_manager
=
AccountManager
()
if
account_manager
.
has_account
(
uri
):
account
=
account_manager
.
get_account
(
uri
)
icon
=
IconManager
()
.
get
(
'avatar'
)
or
session
.
chat_widget
.
default_user_icon
icon
=
IconManager
()
.
get
(
'avatar'
)
or
session
.
chat_widget
.
default_user_icon
icon_filename
=
icon
.
filename
sender
=
ChatSender
(
message
.
sender
.
display_name
or
account
.
display_name
,
uri
,
icon
.
filename
)
elif
blink_session
.
remote_focus
:
elif
blink_session
.
remote_focus
:
contact
,
contact_uri
=
URIUtils
.
find_contact
(
uri
)
contact
,
contact_uri
=
URIUtils
.
find_contact
(
uri
)
icon_filename
=
contact
.
icon
.
filename
sender
=
ChatSender
(
message
.
sender
.
display_name
or
contact
.
name
,
uri
,
contact
.
icon
.
filename
)
else
:
else
:
icon_filename
=
session
.
icon
.
filename
sender
=
ChatSender
(
message
.
sender
.
display_name
or
session
.
name
,
uri
,
session
.
icon
.
filename
)
sender
=
ChatSender
(
message
.
sender
.
display_name
,
uri
,
icon_filename
)
content
=
message
.
body
if
message
.
content_type
==
'text/html'
else
QTextDocument
(
message
.
body
)
.
toHtml
()
content
=
message
.
body
if
message
.
content_type
==
'text/html'
else
QTextDocument
(
message
.
body
)
.
toHtml
()
session
.
chat_widget
.
add_message
(
ChatMessage
(
content
,
sender
,
'incoming'
))
session
.
chat_widget
.
add_message
(
ChatMessage
(
content
,
sender
,
'incoming'
))
session
.
remote_composing
=
False
session
.
remote_composing
=
False
...
...
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