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
afb48027
Commit
afb48027
authored
Sep 01, 2022
by
Tijmen de Mes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent duplicate public key messages
parent
880466ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
messages.py
blink/messages.py
+3
-3
No files found.
blink/messages.py
View file @
afb48027
...
...
@@ -429,10 +429,9 @@ class OutgoingMessage(object):
if
self
.
content_type
.
lower
()
==
'text/pgp-private-key'
:
self
.
_send
(
routes
)
return
self
.
session
.
routes
=
routes
# TODO: Figure out how now to send a public when required, not always on start of the first message in the session
if
self
.
content_type
!=
'text/pgp-public-key'
:
if
self
.
content_type
!=
'text/pgp-public-key'
and
not
self
.
session
.
routes
:
stream
=
self
.
session
.
fake_streams
.
get
(
'messages'
)
if
self
.
session
.
account
.
sms
.
enable_pgp
and
stream
.
can_decrypt
:
directory
=
os
.
path
.
join
(
SIPSimpleSettings
()
.
chat
.
keys_directory
.
normalized
,
'private'
)
...
...
@@ -441,7 +440,8 @@ class OutgoingMessage(object):
with
open
(
f
'{filename}.pubkey'
,
'rb'
)
as
f
:
public_key
=
f
.
read
()
.
decode
()
public_key_message
=
OutgoingMessage
(
self
.
session
.
account
,
self
.
contact
,
str
(
public_key
),
'text/pgp-public-key'
,
session
=
self
.
session
)
public_key_message
.
send
()
MessageManager
()
.
_send_message
(
public_key_message
)
self
.
session
.
routes
=
routes
self
.
_send
()
def
_NH_DNSLookupDidFail
(
self
,
notification
):
...
...
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