feat: Introduce multi-platform architecture for Electron and Web clients with shared UI components, Convex backend for messaging, and integrated search functionality.
Some checks failed
Build and Release / build-and-release (push) Has been cancelled
Some checks failed
Build and Release / build-and-release (push) Has been cancelled
This commit is contained in:
@@ -62,3 +62,25 @@ export const getChannelMembers = query({
|
||||
return members;
|
||||
},
|
||||
});
|
||||
|
||||
export const listAll = query({
|
||||
args: {},
|
||||
returns: v.any(),
|
||||
handler: async (ctx) => {
|
||||
const users = await ctx.db.query("userProfiles").collect();
|
||||
const results = [];
|
||||
for (const user of users) {
|
||||
let avatarUrl: string | null = null;
|
||||
if (user.avatarStorageId) {
|
||||
avatarUrl = await getPublicStorageUrl(ctx, user.avatarStorageId);
|
||||
}
|
||||
results.push({
|
||||
id: user._id,
|
||||
username: user.username,
|
||||
status: user.status || "offline",
|
||||
avatarUrl,
|
||||
});
|
||||
}
|
||||
return results;
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user