feat: Add support for Slack reaction and message notifications

This commit is contained in:
2024-12-16 20:44:09 +01:00
parent 735b2f5481
commit 33dc17483a
30 changed files with 2804 additions and 853 deletions

View File

@@ -3,12 +3,14 @@ import { GithubDiscussionNotificationListItem } from "./GithubDiscussionNotifica
import { NotificationListItemProps } from "../../../notification";
export function GithubNotificationListItem({ notification, mutate }: NotificationListItemProps) {
switch (notification.details?.type) {
if (notification.source_item.data.type !== "GithubNotification") return null;
switch (notification.source_item.data.content.item?.type) {
case "GithubPullRequest":
return (
<GithubPullRequestNotificationListItem
notification={notification}
githubPullRequest={notification.details.content}
githubPullRequest={notification.source_item.data.content.item.content}
mutate={mutate}
/>
);
@@ -16,7 +18,7 @@ export function GithubNotificationListItem({ notification, mutate }: Notificatio
return (
<GithubDiscussionNotificationListItem
notification={notification}
githubDiscussion={notification.details.content}
githubDiscussion={notification.source_item.data.content.item.content}
mutate={mutate}
/>
);