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
G
gajim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
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
Hide 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):
...
@@ -343,6 +343,11 @@ def build_message_stanza(self, message):
stanza
.
setTag
(
'no-store'
,
stanza
.
setTag
(
'no-store'
,
namespace
=
Namespace
.
MSG_HINTS
)
namespace
=
Namespace
.
MSG_HINTS
)
# Add other nodes
if
message
.
nodes
is
not
None
:
for
node
in
message
.
nodes
:
stanza
.
addChild
(
node
=
node
)
return
stanza
return
stanza
def
log_message
(
self
,
message
):
def
log_message
(
self
,
message
):
...
...
gajim/common/structs.py
View file @
ae397ca8
...
@@ -65,7 +65,8 @@ def __init__(self,
...
@@ -65,7 +65,8 @@ def __init__(self,
correct_id
=
None
,
correct_id
=
None
,
automatic_message
=
False
,
automatic_message
=
False
,
oob_url
=
None
,
oob_url
=
None
,
xhtml
=
None
):
xhtml
=
None
,
nodes
=
None
):
if
type_
not
in
(
'chat'
,
'groupchat'
,
'normal'
,
'headline'
):
if
type_
not
in
(
'chat'
,
'groupchat'
,
'normal'
,
'headline'
):
raise
ValueError
(
'Unknown message type: %s'
%
type_
)
raise
ValueError
(
'Unknown message type: %s'
%
type_
)
...
@@ -110,6 +111,8 @@ def __init__(self,
...
@@ -110,6 +111,8 @@ def __init__(self,
if
xhtml
is
not
None
:
if
xhtml
is
not
None
:
self
.
additional_data
.
set_value
(
'gajim'
,
'xhtml'
,
xhtml
)
self
.
additional_data
.
set_value
(
'gajim'
,
'xhtml'
,
xhtml
)
self
.
nodes
=
nodes
self
.
timestamp
=
None
self
.
timestamp
=
None
self
.
message_id
=
None
self
.
message_id
=
None
self
.
stanza
=
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