fix: DM close visibility flag, wire Remove Friend button, harden deploy script
- Redesign DM close as a visibility flag (closed column) instead of row deletion, so message broadcasts still reach users who closed a DM conversation - Add broadcastDmMessage() helper that auto-resurfaces closed DMs when new messages arrive - Wire Remove Friend button in DM welcome header with onClick handler and friend check - Fix deploy.sh to cd to its own directory so rsync always runs from project root
This commit is contained in:
@@ -74,6 +74,7 @@ export const dmChannels = sqliteTable('dm_channels', {
|
||||
export const dmMembers = sqliteTable('dm_members', {
|
||||
dmChannelId: text('dm_channel_id').notNull().references(() => dmChannels.id, { onDelete: 'cascade' }),
|
||||
userId: text('user_id').notNull().references(() => users.id, { onDelete: 'cascade' }),
|
||||
closed: integer('closed').default(0),
|
||||
}, (table) => ({
|
||||
pk: primaryKey({ columns: [table.dmChannelId, table.userId] }),
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user