Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-53429

Attachment attribute has wrong conversion type

XMLWordPrintable

      Hi,

      Rocket Chat API expects a boolean value for titleLinkDownload in attachements object.

      cf : https://rocket.chat/docs/developer-guides/rest-api/chat/postmessage/#attachments-detail

      When this is true, a download icon appears and clicking this saves the link to file.

      This breaks the usage of attachements in the workflow pipeline syntax because it needs a string for titleLinkDownload. (MessageAttachment.java#L46)

      e.g. :

       

      rocketSend(
          attachments: [[
              title: 'My repository',
              color: 'red',
              text: 'unit test failed :sob:',
              thumbUrl: '',
              messageLink: '',
              collapsed: false,
              authorName: 'Zevran',
              authorIcon: '',
              authorLink: '',
              titleLink: 'https://github.com',
              titleLinkDownload: '',
              imageUrl: '',
              audioUrl: '',
              videoUrl: ''
          ]],
          channel: 'devops',
          message: '',
          avatar: 'https://github.com/fluidicon.png',
          failOnError: true,
          rawMessage: true
      )
      

       

      Regards

       

            mreinhardt Martin Reinhardt
            zevran Gaël Reyrol
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: