fix(guild): emit is_friend / is_friend_apply in /guild/info members
GuildMemberInfo.cs:48-49 re-reads json["is_friend"] / json["is_friend_apply"] UNGUARDED on top of the base-class UserInfoBase's guarded read. Our DTO had them as int? with global WhenWritingNull → keys omitted → LitJson threw KeyNotFoundException, crashing the client right after guild create. Flip the fields to non-nullable int with JsonIgnoreCondition.Never so they always ship, and wire a batched IFriendService.GetFriendRelationsAsync lookup so the values are actually populated (single Contains-batched query per relation table). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -82,3 +82,9 @@ public sealed record BattleParticipationContext(
|
||||
int BattleType,
|
||||
int DeckFormat,
|
||||
int TwoPickType);
|
||||
|
||||
/// <summary>
|
||||
/// Caller-relative friend flags for another viewer. Used to badge rows in guild-member,
|
||||
/// invite-candidate, and join-request lists on the wire (<c>is_friend</c>, <c>is_friend_apply</c>).
|
||||
/// </summary>
|
||||
public sealed record FriendRelation(bool IsFriend, bool HasOutgoingApply);
|
||||
|
||||
Reference in New Issue
Block a user