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
8458b3a7
Commit
8458b3a7
authored
Feb 14, 2020
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added testing code to enable/disable OTR on the fly during chat sessions
parent
3df82202
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
chatwindow.py
blink/chatwindow.py
+15
-0
No files found.
blink/chatwindow.py
View file @
8458b3a7
...
@@ -815,6 +815,21 @@ class ChatWidget(base_class, ui_class):
...
@@ -815,6 +815,21 @@ class ChatWidget(base_class, ui_class):
def
_SH_ChatInputTextEntered
(
self
,
text
):
def
_SH_ChatInputTextEntered
(
self
,
text
):
self
.
composing_timer
.
stop
()
self
.
composing_timer
.
stop
()
doc
=
QTextDocument
()
doc
.
setHtml
(
text
)
plain_text
=
doc
.
toPlainText
()
if
plain_text
==
'/otr+'
:
try
:
self
.
session
.
chat_stream
.
encryption
.
start
()
except
AttributeError
:
pass
return
elif
plain_text
==
'/otr-'
:
try
:
self
.
session
.
chat_stream
.
encryption
.
stop
()
except
AttributeError
:
pass
return
try
:
try
:
self
.
send_message
(
text
,
content_type
=
'text/html'
)
self
.
send_message
(
text
,
content_type
=
'text/html'
)
except
Exception
,
e
:
except
Exception
,
e
:
...
...
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