Mobile notifications for iOS (#210)
* mobile: wire notification registration and listener
* implement backend components for push notifications
* refactor: agentic comment cleanup
* docs: use proper module name for particle processor
* set required env variables for push notifications
* bump version
* fix: always upsert push token on mobile start
* Revert "fix: always upsert push token on mobile start"
This reverts commit 90ff18a788.
* send push notifications regardless of online status
This commit was merged in pull request #210.
This commit is contained in:
@@ -139,6 +139,20 @@ class ApiClient {
|
||||
await this.requestVoid("PATCH", "/humans/me/settings", data);
|
||||
}
|
||||
|
||||
// --- Push notification tokens ---
|
||||
|
||||
async registerPushToken(data: {
|
||||
token: string;
|
||||
platform: "ios" | "android";
|
||||
app_version: string;
|
||||
}): Promise<void> {
|
||||
await this.requestVoid("POST", "/humans/me/push-tokens", data);
|
||||
}
|
||||
|
||||
async unregisterPushToken(token: string): Promise<void> {
|
||||
await this.requestVoid("DELETE", "/humans/me/push-tokens", { token });
|
||||
}
|
||||
|
||||
// --- Depot ---
|
||||
|
||||
async prepareUpload(data: PrepareUploadRequest) {
|
||||
|
||||
Reference in New Issue
Block a user