Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Yann Leboulanger
gajim
Commits
5173ca41
Commit
5173ca41
authored
Oct 04, 2018
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pull correct security catalog for private messages
parent
e6641858
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
gajim/chat_control_base.py
gajim/chat_control_base.py
+14
-3
No files found.
gajim/chat_control_base.py
View file @
5173ca41
...
...
@@ -179,13 +179,21 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
# text to show is in in first column of liststore
self
.
seclabel_combo
.
add_attribute
(
cell
,
'text'
,
0
)
con
=
app
.
connections
[
self
.
account
]
jid
=
self
.
contact
.
jid
if
self
.
TYPE_ID
==
'pm'
:
jid
=
self
.
gc_contact
.
room_jid
if
con
.
get_module
(
'SecLabels'
).
supported
:
con
.
get_module
(
'SecLabels'
).
request_catalog
(
self
.
contact
.
jid
)
con
.
get_module
(
'SecLabels'
).
request_catalog
(
jid
)
def
_sec_labels_received
(
self
,
event
):
if
event
.
account
!=
self
.
account
:
return
if
event
.
jid
!=
self
.
contact
.
jid
:
jid
=
self
.
contact
.
jid
if
self
.
TYPE_ID
==
'pm'
:
jid
=
self
.
gc_contact
.
room_jid
if
event
.
jid
!=
jid
:
return
model
=
self
.
seclabel_combo
.
get_model
()
model
.
clear
()
...
...
@@ -765,7 +773,10 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
return
con
=
app
.
connections
[
self
.
account
]
catalog
=
con
.
get_module
(
'SecLabels'
).
get_catalog
(
self
.
contact
.
jid
)
jid
=
self
.
contact
.
jid
if
self
.
TYPE_ID
==
'pm'
:
jid
=
self
.
gc_contact
.
room_jid
catalog
=
con
.
get_module
(
'SecLabels'
).
get_catalog
(
jid
)
labels
,
label_list
,
_
=
catalog
lname
=
label_list
[
idx
]
label
=
labels
[
lname
]
...
...
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