mirror of
https://github.com/pezkuwichain/pezkuwi-telegram-miniapp.git
synced 2026-06-22 02:01:04 +00:00
feat: add secure announcement reactions with session token validation
- Add announcement-reaction Edge Function for secure like/dislike - Update telegram-auth to sync users to tg_users table - Update useAnnouncementReaction hook to use Edge Function - Add bridge announcement script and migration
This commit is contained in:
@@ -14,10 +14,10 @@ import { useAuth } from '@/contexts/AuthContext';
|
||||
|
||||
export function AnnouncementsSection() {
|
||||
const { hapticImpact, hapticNotification, openLink } = useTelegram();
|
||||
const { isAuthenticated } = useAuth();
|
||||
const { isAuthenticated, sessionToken } = useAuth();
|
||||
|
||||
const { data: announcements, isLoading, refetch, isRefetching } = useAnnouncements();
|
||||
const reactionMutation = useAnnouncementReaction();
|
||||
const reactionMutation = useAnnouncementReaction(sessionToken);
|
||||
|
||||
const handleReaction = (id: string, reaction: 'like' | 'dislike') => {
|
||||
if (!isAuthenticated) {
|
||||
|
||||
Reference in New Issue
Block a user