Skip to content

Commit 85f3ae5

Browse files
committed
removed await from both save notification and client behaviour
1 parent 4d27482 commit 85f3ae5

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

docs/mini-apps/core-concepts/notifications.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ Notification tokens are unique to each client app. This means a user can have se
8585

8686
case "notifications_enabled":
8787
// Save new notification details and send confirmation
88-
await setUserNotificationDetails(fid, appFid, event.notificationDetails);
89-
await sendMiniAppNotification({
88+
setUserNotificationDetails(fid, appFid, event.notificationDetails);
89+
sendMiniAppNotification({
9090
fid,
9191
appFid,
9292
title: "Ding ding ding",
@@ -137,16 +137,7 @@ Notification tokens are unique to each client app. This means a user can have se
137137

138138
<Warning>
139139
**Important: Webhook Response Timing**
140-
141140
Webhooks must respond within 10 seconds to avoid timeouts from the Base app. If you encounter a "Failed to add mini app" error, your webhook may be taking too long to respond.
142-
143-
Different client apps handle webhook responses differently:
144-
145-
**Farcaster app**: Does not wait for webhook responses and does not require a success response to activate notification tokens
146-
147-
**Base app**: Waits for the webhook to return a success response before activating the notification token.
148-
149-
This means if your webhook processes token saving and sends notifications synchronously before returning a response, tokens may work on Farcaster but fail to activate on Base app.
150141
</Warning>
151142

152143
```tsx page.tsx highlight={11, 25-27}
@@ -363,3 +354,12 @@ Sent when a user disables notifications from, e.g., a settings panel in the clie
363354
"event": "notifications_disabled"
364355
}
365356
```
357+
## Client App Behavior
358+
359+
Different client apps handle webhook responses differently:
360+
361+
**Farcaster app**: Does not wait for webhook responses and does not require a success response to activate notification tokens
362+
363+
**Base app**: Waits for the webhook to return a success response before activating the notification token.
364+
365+
This means if your webhook processes token saving and sends notifications synchronously before returning a response, tokens may work on Farcaster but fail to activate on Base app.

0 commit comments

Comments
 (0)