feat: Implement Direct Messaging with new frontend components, user search, and backend read state management.
All checks were successful
Build and Release / build-and-release (push) Successful in 10m9s

This commit is contained in:
Bryan1029384756
2026-02-11 08:01:51 -06:00
parent 44814011fe
commit e773ab41ae
10 changed files with 154 additions and 30 deletions

View File

@@ -50,6 +50,7 @@ export const listDMs = query({
other_user_id: v.string(),
other_username: v.string(),
other_user_status: v.optional(v.string()),
other_user_avatar_url: v.optional(v.union(v.string(), v.null())),
})
),
handler: async (ctx, args) => {
@@ -74,12 +75,17 @@ export const listDMs = query({
const otherUser = await ctx.db.get(otherPart.userId);
if (!otherUser) return null;
const avatarUrl = otherUser.avatarStorageId
? await ctx.storage.getUrl(otherUser.avatarStorageId)
: null;
return {
channel_id: part.channelId,
channel_name: channel.name,
other_user_id: otherUser._id as string,
other_username: otherUser.username,
other_user_status: otherUser.status || "offline",
other_user_avatar_url: avatarUrl,
};
})
);

View File

@@ -104,7 +104,7 @@ export const getLatestMessageTimestamps = query({
if (latestMsg) {
results.push({
channelId,
latestTimestamp: latestMsg._creationTime,
latestTimestamp: Math.floor(latestMsg._creationTime),
});
}
}