Pull icon choosing into its own method

Pull icon choosing into its own method

diff --git a/app/assets/javascripts/discourse/widgets/default-notification-item.js.es6 b/app/assets/javascripts/discourse/widgets/default-notification-item.js.es6
index 2140cc9..90f18e7 100644
--- a/app/assets/javascripts/discourse/widgets/default-notification-item.js.es6
+++ b/app/assets/javascripts/discourse/widgets/default-notification-item.js.es6
@@ -118,16 +118,20 @@ export const DefaultNotificationItem =
       return I18n.t(scope, { description, username });
     },
 
+    icon(notificationName, data) {
+      let infoKey =
+        notificationName === "custom" ? data.message : notificationName;
+      return iconNode(`notification.${infoKey}`);
+    },
+
     html(attrs) {
       const notificationType = attrs.notification_type;
       const lookup = this.site.get("notificationLookup");
       const notificationName = lookup[notificationType];
 
       let { data } = attrs;
-      let infoKey =
-        notificationName === "custom" ? data.message : notificationName;
       let text = emojiUnescape(this.text(notificationType, notificationName));
-      let icon = iconNode(`notification.${infoKey}`);
+      let icon = this.icon(notificationName, data);
 
       let title;

GitHub sha: 02deaa4b