Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Vladislav Yarmak
gajim-plugins
Commits
8da65017
Commit
8da65017
authored
Nov 06, 2017
by
Philipp Hörist
Browse files
[httpupload] Add oob_url to additional data
- This is needed so url_image_preview works
parent
348d87a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
httpupload/httpupload.py
View file @
8da65017
...
...
@@ -53,9 +53,9 @@ class HTTPUploadPlugin(GajimPlugin):
'agent-info-received'
:
(
ged
.
PRECORE
,
self
.
handle_agent_info_received
),
'stanza-message-outgoing'
:
(
99
,
self
.
handle_outgoing_stanza
),
ged
.
OUT_PREGUI
,
self
.
handle_outgoing_stanza
),
'gc-stanza-message-outgoing'
:
(
99
,
self
.
handle_outgoing_stanza
),
ged
.
OUT_PREGUI
,
self
.
handle_outgoing_stanza
),
'raw-iq-received'
:
(
ged
.
PRECORE
,
self
.
handle_iq_received
)}
self
.
gui_extension_points
=
{
...
...
@@ -105,6 +105,10 @@ class HTTPUploadPlugin(GajimPlugin):
self
.
messages
.
remove
(
message
)
oob
=
event
.
msg_iq
.
addChild
(
'x'
,
namespace
=
nbxmpp
.
NS_X_OOB
)
oob
.
addChild
(
'url'
).
setData
(
message
)
if
'gajim'
in
event
.
additional_data
:
event
.
additional_data
[
'gajim'
][
'oob_url'
]
=
message
else
:
event
.
additional_data
[
'gajim'
]
=
{
'oob_url'
:
message
}
def
connect_with_chat_control
(
self
,
chat_control
):
account
=
chat_control
.
contact
.
account
.
name
...
...
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