Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-17814

Notification RSS template doesn't work properly with custom descriptors

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      The default notification RSS template currently uses by default the following code to display notifications:

      #set ($app  = "$!event.events.get(0).application")
      #if ($app == 'xwiki')
        #set ($app = $services.localization.render('core.events.appName'))
      #end
      [...]
      <p>
        <strong>$app: [$event.type]</strong>
      

      with $!event.events.get(0).application being currently set by the DefaultRecordableEventConverter from the notify source. And it's documented in https://extensions.xwiki.org/xwiki/bin/view/Extension/Notifications%20API/#HExampleofcodetosendanotification to use the full module name for it:

      observationManager.notify(new BlogPostPublishedEvent(), "org.xwiki.platform:xwiki-platform-blog-api", document);
      

      So there is at least 2 problems here:
      1. for the event type a translation key should be considered
      2. the application name is completely wrong: we should not based it on the module name IMO, and it should also use a translation key.

      Attachments

        Issue Links

          Activity

            People

              surli Simon Urli
              surli Simon Urli
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: