feat: Implement core Discord features including members list, direct messages, user presence, authentication, and chat UI.
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:
@@ -198,6 +198,7 @@ export const getPublicKeys = query({
|
||||
username: v.string(),
|
||||
public_identity_key: v.string(),
|
||||
status: v.optional(v.string()),
|
||||
displayName: v.optional(v.string()),
|
||||
avatarUrl: v.optional(v.union(v.string(), v.null())),
|
||||
aboutMe: v.optional(v.string()),
|
||||
customStatus: v.optional(v.string()),
|
||||
@@ -215,7 +216,8 @@ export const getPublicKeys = query({
|
||||
id: u._id,
|
||||
username: u.username,
|
||||
public_identity_key: u.publicIdentityKey,
|
||||
status: u.status || "online",
|
||||
status: u.status || "offline",
|
||||
displayName: u.displayName,
|
||||
avatarUrl,
|
||||
aboutMe: u.aboutMe,
|
||||
customStatus: u.customStatus,
|
||||
@@ -229,6 +231,7 @@ export const getPublicKeys = query({
|
||||
export const updateProfile = mutation({
|
||||
args: {
|
||||
userId: v.id("userProfiles"),
|
||||
displayName: v.optional(v.string()),
|
||||
aboutMe: v.optional(v.string()),
|
||||
avatarStorageId: v.optional(v.id("_storage")),
|
||||
customStatus: v.optional(v.string()),
|
||||
@@ -236,6 +239,7 @@ export const updateProfile = mutation({
|
||||
returns: v.null(),
|
||||
handler: async (ctx, args) => {
|
||||
const patch: Record<string, unknown> = {};
|
||||
if (args.displayName !== undefined) patch.displayName = args.displayName;
|
||||
if (args.aboutMe !== undefined) patch.aboutMe = args.aboutMe;
|
||||
if (args.avatarStorageId !== undefined) patch.avatarStorageId = args.avatarStorageId;
|
||||
if (args.customStatus !== undefined) patch.customStatus = args.customStatus;
|
||||
|
||||
Reference in New Issue
Block a user