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
8366a9e5
Commit
8366a9e5
authored
Apr 08, 2014
by
Saul Ibarra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement option for auto-accepting chat from known contacts
parent
6eb5c806
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
sessions.py
blink/sessions.py
+14
-1
No files found.
blink/sessions.py
View file @
8366a9e5
...
...
@@ -5203,7 +5203,6 @@ class SessionManager(object):
session
.
reject
(
488
)
return
session
.
send_ring_indication
()
contact
,
contact_uri
=
URIUtils
.
find_contact
(
session
.
remote_identity
.
uri
,
display_name
=
session
.
remote_identity
.
display_name
,
exact
=
False
)
if
filetransfer_streams
and
not
(
audio_streams
or
video_streams
or
chat_streams
or
screensharing_streams
):
...
...
@@ -5217,6 +5216,19 @@ class SessionManager(object):
chat_stream
=
chat_streams
[
0
]
if
chat_streams
else
None
screensharing_stream
=
screensharing_streams
[
0
]
if
screensharing_streams
else
None
settings
=
SIPSimpleSettings
()
if
chat_stream
and
not
(
audio_stream
or
video_stream
or
screensharing_stream
)
and
contact
.
type
!=
'dummy'
and
settings
.
chat
.
auto_accept
:
try
:
blink_session
=
next
(
session
for
session
in
self
.
sessions
if
session
.
reusable
and
session
.
contact
.
settings
is
contact
.
settings
)
reinitialize
=
True
except
StopIteration
:
blink_session
=
BlinkSession
()
self
.
sessions
.
append
(
blink_session
)
reinitialize
=
False
blink_session
.
init_incoming
(
session
,
[
chat_stream
],
contact
,
contact_uri
,
reinitialize
=
reinitialize
)
return
dialog
=
IncomingDialog
()
# The dialog is constructed without the main window as parent so that on Linux it is displayed on the current workspace rather than the one where the main window is.
incoming_request
=
IncomingRequest
(
dialog
,
session
,
contact
,
contact_uri
,
proposal
=
False
,
audio_stream
=
audio_stream
,
video_stream
=
video_stream
,
chat_stream
=
chat_stream
,
screensharing_stream
=
screensharing_stream
)
incoming_request
.
accepted
.
connect
(
self
.
_SH_IncomingRequestAccepted
)
...
...
@@ -5228,6 +5240,7 @@ class SessionManager(object):
except
IndexError
:
position
=
None
incoming_request
.
dialog
.
show
(
activate
=
QApplication
.
activeWindow
()
is
not
None
and
self
.
incoming_requests
.
index
(
incoming_request
)
==
0
,
position
=
position
)
session
.
send_ring_indication
()
self
.
update_ringtone
()
def
_NH_SIPSessionDidFail
(
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