Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
fix: redirect channel push into channel instead of tab
Browse files Browse the repository at this point in the history
  • Loading branch information
hirbod committed Oct 27, 2023
1 parent 1432a19 commit 81e7047
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/app/hooks/use-handle-notification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ export function useHandleNotification() {
useEffect(() => {
const responseListener =
Notifications.addNotificationResponseReceivedListener((response) => {
router.push("/notifications");
const channelId =
response?.notification?.request?.content?.data?.channel_id;
if (channelId) {
router.push(`/channels/${channelId}`);
} else {
router.push("/notifications");
}
// const content =
// Platform.OS === "ios"
// ? response?.notification?.request?.content?.data?.body?.path
Expand Down

0 comments on commit 81e7047

Please sign in to comment.