Feature/matrix extended (#1162)

* added Matrix option to send notice and emote messages

* added Matrix option to send HTML messages

*  Small text changes

Co-authored-by: Sabine <sabinbox@laszakovits.net>
This commit is contained in:
Ricardo Espinoza
2020-11-16 01:42:57 -05:00
committed by GitHub
parent f2666e92ff
commit 4ca2b63bcc
2 changed files with 96 additions and 2 deletions

View File

@@ -79,10 +79,96 @@ export const messageFields = [
},
description: 'The text to send.',
},
{
displayName: 'Message type',
name: 'msgType',
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'message',
],
},
},
type: 'options',
options: [
{
name: 'Text',
value: 'm.text',
description: 'Send a text message.',
},
{
name: 'Emote',
value: 'm.emote',
description: 'Perform an action (similar to /me in IRC).',
},
{
name: 'Notice',
value: 'm.notice',
description: 'Send a notice.',
},
],
default: 'm.text',
description: 'The type of message to send.',
},
{
displayName: 'Message Format',
name: 'format',
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'message',
],
},
},
type: 'options',
options: [
{
name: 'Plain Text',
value: 'plain',
description: 'Text only',
},
{
name: 'HTML',
value: 'org.matrix.custom.html',
description: 'HTML-formatted text',
},
],
default: 'plain',
description: "The format of the message's body.",
},
{
displayName: 'Fallback Text',
name: 'fallbackText',
displayOptions: {
show: {
resource: [
'message',
],
operation: [
'create',
],
format: [
'org.matrix.custom.html',
],
},
},
type: 'string',
typeOptions: {
alwaysOpenEditWindow: true,
},
placeholder: 'HTML message could not be displayed.',
description: 'A plain text message to display in case the HTML cannot be rendered by the Matrix client.',
},
/* ----------------------------------------------------------------------- */
/* message:getAll */
/* message:getAll */
/* ----------------------------------------------------------------------- */
{
displayName: 'Room ID',