Topic on Extension talk:Echo/Creating a new notification type

Save notification body text in the event?

1
Samwilson (talkcontribs)

The example on this page adds an 'excerpt' extra parameter to the event, which is then displayed as the notification body. Is this best practice? Or, is it preferred if possible to store the least amount of data in the event, and look up anything else when the notification is displayed?

For example, the Thanks extension stores an edit excerpt (using EchoDiscussionParser::getEditExcerpt()) in the event, but then when displaying the notification first tries to look up the revision comment and will use that if it can (i.e. if it's still visible to the user) and only if it can't use that will it display the stored excerpt.

Reply to "Save notification body text in the event?"