feat: add live Discord sharing functionality with dynamic habit progress images
- Implemented live card image generation for user habits using canvas. - Created API endpoints for starting and managing live Discord sharing sessions. - Added tests for live Discord sharing to ensure functionality and reliability. - Introduced CSS styles for the live Discord sharing interface. - Enhanced error handling and state management for Discord message updates.
This commit is contained in:
7
drizzle/0009_purple_wasp.sql
Normal file
7
drizzle/0009_purple_wasp.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
CREATE TABLE `live_cards` (
|
||||
`user_id` text PRIMARY KEY NOT NULL,
|
||||
`token` text NOT NULL,
|
||||
FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX `live_cards_token_unique` ON `live_cards` (`token`);
|
||||
17
drizzle/0010_tidy_thena.sql
Normal file
17
drizzle/0010_tidy_thena.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
CREATE TABLE `live_discord_cards` (
|
||||
`user_id` text PRIMARY KEY NOT NULL,
|
||||
`channel_id` text NOT NULL,
|
||||
`message_id` text,
|
||||
`message_url` text,
|
||||
`nonce` text NOT NULL,
|
||||
`theme` text NOT NULL,
|
||||
`status` text NOT NULL,
|
||||
`image_hash` text,
|
||||
`dirty` integer DEFAULT true NOT NULL,
|
||||
`error` text,
|
||||
`retry_at` integer,
|
||||
`updated_at` integer NOT NULL,
|
||||
FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
--> statement-breakpoint
|
||||
DROP TABLE `live_cards`;
|
||||
1003
drizzle/meta/0009_snapshot.json
Normal file
1003
drizzle/meta/0009_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
1066
drizzle/meta/0010_snapshot.json
Normal file
1066
drizzle/meta/0010_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -64,6 +64,20 @@
|
||||
"when": 1788539875559,
|
||||
"tag": "0008_reminder_cooldown",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 9,
|
||||
"version": "6",
|
||||
"when": 1788596417948,
|
||||
"tag": "0009_purple_wasp",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 10,
|
||||
"version": "6",
|
||||
"when": 1788597003524,
|
||||
"tag": "0010_tidy_thena",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user