Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Philipp Hörist
gajim
Commits
ae397ca8
Commit
ae397ca8
authored
Apr 30, 2020
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Message: Allow plugins to add arbitrary xml elements
parent
147ed3c5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
gajim/common/modules/message.py
gajim/common/modules/message.py
+5
-0
gajim/common/structs.py
gajim/common/structs.py
+4
-1
No files found.
gajim/common/modules/message.py
View file @
ae397ca8
...
...
@@ -343,6 +343,11 @@ def build_message_stanza(self, message):
stanza
.
setTag
(
'no-store'
,
namespace
=
Namespace
.
MSG_HINTS
)
# Add other nodes
if
message
.
nodes
is
not
None
:
for
node
in
message
.
nodes
:
stanza
.
addChild
(
node
=
node
)
return
stanza
def
log_message
(
self
,
message
):
...
...
gajim/common/structs.py
View file @
ae397ca8
...
...
@@ -65,7 +65,8 @@ def __init__(self,
correct_id
=
None
,
automatic_message
=
False
,
oob_url
=
None
,
xhtml
=
None
):
xhtml
=
None
,
nodes
=
None
):
if
type_
not
in
(
'chat'
,
'groupchat'
,
'normal'
,
'headline'
):
raise
ValueError
(
'Unknown message type: %s'
%
type_
)
...
...
@@ -110,6 +111,8 @@ def __init__(self,
if
xhtml
is
not
None
:
self
.
additional_data
.
set_value
(
'gajim'
,
'xhtml'
,
xhtml
)
self
.
nodes
=
nodes
self
.
timestamp
=
None
self
.
message_id
=
None
self
.
stanza
=
None
...
...
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