XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

fix: don't add unicode suffix in addAccountDataToFriendInfo (#3542)

This seems cause problems with the clan member list. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3542 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

2cd01f6a
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

1 个文件 +2 -3
Modified src/services/friendService.ts +2 -3
@@ -4,11 +4,10 @@ import { Account } from "../models/loginModel.ts";
4 4 import type { Types } from "mongoose";
5 5 import { Friendship } from "../models/friendModel.ts";
6 6 import { fromOid, toMongoDate2 } from "../helpers/inventoryHelpers.ts";
7 import { getUnicodeName } from "./loginService.ts";
8 7
9 8 export const addAccountDataToFriendInfo = async (info: IFriendInfo, buildLabel: string | undefined): Promise<void> => {
10 const account = (await Account.findById(fromOid(info._id)))!;
11 info.DisplayName = getUnicodeName(account, buildLabel);
9 const account = (await Account.findById(fromOid(info._id), "DisplayName LastLogin LastPlatform"))!;
10 info.DisplayName = account.DisplayName;
12 11 info.LastLogin = toMongoDate2(account.LastLogin, buildLabel);
13 12 info.LastPlatform = account.LastPlatform;
14 13 };