Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
l-n-s
gajim
Commits
8cdad276
Commit
8cdad276
authored
7 years ago
by
Philipp Hörist
Browse files
Options
Downloads
Patches
Plain Diff
Fix httpupload when using multiple accounts
Fixes #8865
parent
0966a2c2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gajim/common/connection_handlers.py
+1
-1
1 addition, 1 deletion
gajim/common/connection_handlers.py
gajim/common/httpupload.py
+6
-2
6 additions, 2 deletions
gajim/common/httpupload.py
with
7 additions
and
3 deletions
gajim/common/connection_handlers.py
+
1
−
1
View file @
8cdad276
...
@@ -1261,7 +1261,7 @@ ConnectionHTTPUpload):
...
@@ -1261,7 +1261,7 @@ ConnectionHTTPUpload):
ConnectionPubSub
.
__init__
(
self
)
ConnectionPubSub
.
__init__
(
self
)
ConnectionPEP
.
__init__
(
self
,
account
=
self
.
name
,
dispatcher
=
self
,
ConnectionPEP
.
__init__
(
self
,
account
=
self
.
name
,
dispatcher
=
self
,
pubsub_connection
=
self
)
pubsub_connection
=
self
)
ConnectionHTTPUpload
.
__init__
(
self
,
account
=
self
.
name
)
ConnectionHTTPUpload
.
__init__
(
self
)
# Handle presences BEFORE caps
# Handle presences BEFORE caps
app
.
nec
.
register_incoming_event
(
PresenceReceivedEvent
)
app
.
nec
.
register_incoming_event
(
PresenceReceivedEvent
)
...
...
This diff is collapsed.
Click to expand it.
gajim/common/httpupload.py
+
6
−
2
View file @
8cdad276
...
@@ -46,8 +46,7 @@ class ConnectionHTTPUpload:
...
@@ -46,8 +46,7 @@ class ConnectionHTTPUpload:
Implement HTTP File Upload
Implement HTTP File Upload
(XEP-0363, https://xmpp.org/extensions/xep-0363.html)
(XEP-0363, https://xmpp.org/extensions/xep-0363.html)
"""
"""
def
__init__
(
self
,
account
):
def
__init__
(
self
):
self
.
name
=
account
self
.
encrypted_upload
=
False
self
.
encrypted_upload
=
False
self
.
component
=
None
self
.
component
=
None
self
.
max_file_size
=
None
# maximum file size in bytes
self
.
max_file_size
=
None
# maximum file size in bytes
...
@@ -84,6 +83,9 @@ class ConnectionHTTPUpload:
...
@@ -84,6 +83,9 @@ class ConnectionHTTPUpload:
return
return
account
=
event
.
conn
.
name
account
=
event
.
conn
.
name
if
account
!=
self
.
name
:
return
self
.
component
=
event
.
jid
self
.
component
=
event
.
jid
for
form
in
event
.
data
:
for
form
in
event
.
data
:
...
@@ -102,6 +104,8 @@ class ConnectionHTTPUpload:
...
@@ -102,6 +104,8 @@ class ConnectionHTTPUpload:
account
,
self
.
max_file_size
/
(
1024
*
1024
))
account
,
self
.
max_file_size
/
(
1024
*
1024
))
def
handle_outgoing_stanza
(
self
,
event
):
def
handle_outgoing_stanza
(
self
,
event
):
if
event
.
conn
.
name
!=
self
.
name
:
return
message
=
event
.
msg_iq
.
getTagData
(
'
body
'
)
message
=
event
.
msg_iq
.
getTagData
(
'
body
'
)
if
message
and
message
in
self
.
messages
:
if
message
and
message
in
self
.
messages
:
self
.
messages
.
remove
(
message
)
self
.
messages
.
remove
(
message
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment