Pull invitee accepted notification behaviour into its own class

Pull invitee accepted notification behaviour into its own class

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 8b9cb7d..52c96a5 100644
--- a/app/assets/javascripts/discourse/widgets/default-notification-item.js.es6
+++ b/app/assets/javascripts/discourse/widgets/default-notification-item.js.es6
@@ -31,7 +31,6 @@ export const DefaultNotificationItem =
     url() {
       const attrs = this.attrs;
       const data = attrs.data;
-      const notificationTypes = this.site.notification_types;
 
       const badgeId = data.badge_id;
       if (badgeId) {
@@ -55,10 +54,6 @@ export const DefaultNotificationItem =
         return postUrl(attrs.slug, topicId, attrs.post_number);
       }
 
-      if (attrs.notification_type === notificationTypes.invitee_accepted) {
-        return userPath(data.display_username);
-      }
-
       if (data.group_id) {
         return userPath(data.username + "/messages/group/" + data.group_name);
       }
diff --git a/app/assets/javascripts/discourse/widgets/invitee-accepted-notification-item.js.es6 b/app/assets/javascripts/discourse/widgets/invitee-accepted-notification-item.js.es6
new file mode 100644
index 0000000..1e357df
--- /dev/null
+++ b/app/assets/javascripts/discourse/widgets/invitee-accepted-notification-item.js.es6
@@ -0,0 +1,13 @@
+import { createWidgetFrom } from "discourse/widgets/widget";
+import { DefaultNotificationItem } from "discourse/widgets/default-notification-item";
+import { postUrl } from "discourse/lib/utilities";
+import { userPath } from "discourse/lib/url";
+
+createWidgetFrom(DefaultNotificationItem, "invitee-accepted-notification-item", {
+  url() {
+    const attrs = this.attrs;
+    const data = attrs.data;
+
+    return userPath(data.display_username);
+  },
+});

GitHub sha: a3254b84