Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gajim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Daniel Brötzmann
gajim
Commits
8b3eb6d6
Commit
8b3eb6d6
authored
Oct 24, 2020
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IBB: Adapt to nbxmpp changes
parent
7ac4ba3b
Pipeline
#6641
passed with stages
in 2 minutes and 57 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
13 deletions
+23
-13
gajim/common/modules/ibb.py
gajim/common/modules/ibb.py
+23
-13
No files found.
gajim/common/modules/ibb.py
View file @
8b3eb6d6
...
...
@@ -20,7 +20,7 @@
from
nbxmpp.namespaces
import
Namespace
from
nbxmpp.protocol
import
NodeProcessed
from
nbxmpp.structs
import
StanzaHandler
from
nbxmpp.
util
import
is_error_result
from
nbxmpp.
errors
import
StanzaError
from
gajim.common
import
app
from
gajim.common.helpers
import
to_user_string
...
...
@@ -149,11 +149,15 @@ def send_open(self, to, sid, fp):
user_data
=
file_props
)
return
file_props
def
_on_open_result
(
self
,
result
,
file_props
):
if
is_error_result
(
result
):
app
.
socks5queue
.
error_cb
(
'Error'
,
to_user_string
(
result
))
self
.
_log
.
warning
(
result
)
def
_on_open_result
(
self
,
task
):
try
:
task
.
finish
()
except
StanzaError
as
error
:
app
.
socks5queue
.
error_cb
(
'Error'
,
to_user_string
(
error
))
self
.
_log
.
warning
(
error
)
return
file_props
=
task
.
get_user_data
()
self
.
send_data
(
file_props
)
def
send_close
(
self
,
file_props
):
...
...
@@ -183,10 +187,12 @@ def send_close(self, file_props):
if
session
.
weinitiate
:
session
.
cancel_session
()
def
_on_close_result
(
self
,
result
):
if
is_error_result
(
result
):
app
.
socks5queue
.
error_cb
(
'Error'
,
to_user_string
(
result
))
self
.
_log
.
warning
(
result
)
def
_on_close_result
(
self
,
task
):
try
:
task
.
finish
()
except
StanzaError
as
error
:
app
.
socks5queue
.
error_cb
(
'Error'
,
to_user_string
(
error
))
self
.
_log
.
warning
(
error
)
return
def
send_data
(
self
,
file_props
):
...
...
@@ -217,11 +223,15 @@ def send_data(self, file_props):
file_props
.
completed
=
True
app
.
socks5queue
.
progress_transfer_cb
(
self
.
_account
,
file_props
)
def
_on_data_result
(
self
,
result
,
file_props
):
if
is_error_result
(
result
):
app
.
socks5queue
.
error_cb
(
'Error'
,
to_user_string
(
result
))
self
.
_log
.
warning
(
result
)
def
_on_data_result
(
self
,
task
):
try
:
task
.
finish
()
except
StanzaError
as
error
:
app
.
socks5queue
.
error_cb
(
'Error'
,
to_user_string
(
error
))
self
.
_log
.
warning
(
error
)
return
file_props
=
task
.
get_user_data
()
self
.
send_data
(
file_props
)
...
...
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