Add missing aid value to IUserDialogInfo

This commit is contained in:
Dev 2024-01-06 13:49:48 +00:00
parent 4e21239de3
commit 009055ad24
6 changed files with 15 additions and 3 deletions

View File

@ -141,6 +141,7 @@ export class DialogueController
dialog.Users.push({ dialog.Users.push({
_id: profile.characters.pmc.sessionId, _id: profile.characters.pmc.sessionId,
aid: profile.characters.pmc.aid,
Info: { Info: {
Level: profile.characters.pmc.Info.Level, Level: profile.characters.pmc.Info.Level,
Nickname: profile.characters.pmc.Info.Nickname, Nickname: profile.characters.pmc.Info.Nickname,
@ -235,6 +236,7 @@ export class DialogueController
const pmcProfile = fullProfile.characters.pmc; const pmcProfile = fullProfile.characters.pmc;
result.push({ result.push({
_id: fullProfile.info.id, _id: fullProfile.info.id,
aid: fullProfile.info.aid,
Info: { Info: {
Nickname: pmcProfile.Info.Nickname, Nickname: pmcProfile.Info.Nickname,
Side: pmcProfile.Info.Side, Side: pmcProfile.Info.Side,

View File

@ -34,6 +34,7 @@ export class CommandoDialogueChatBot implements IDialogueChatBot
{ {
return { return {
_id: "sptCommando", _id: "sptCommando",
aid: 1234567,
Info: { Level: 1, MemberCategory: MemberCategory.DEVELOPER, Nickname: "Commando", Side: "Usec" }, Info: { Level: 1, MemberCategory: MemberCategory.DEVELOPER, Nickname: "Commando", Side: "Usec" },
}; };
} }

View File

@ -32,6 +32,7 @@ export class SptDialogueChatBot implements IDialogueChatBot
{ {
return { return {
_id: "sptFriend", _id: "sptFriend",
aid: 1234566,
Info: { Info: {
Level: 1, Level: 1,
MemberCategory: MemberCategory.DEVELOPER, MemberCategory: MemberCategory.DEVELOPER,

View File

@ -102,17 +102,18 @@ export interface IDefaultEquipmentPreset extends IUserBuild
export interface Dialogue export interface Dialogue
{ {
attachmentsNew: number; attachmentsNew: number;
type: MessageType;
new: number; new: number;
_id: string; type: MessageType;
Users?: IUserDialogInfo[]; Users?: IUserDialogInfo[];
pinned: boolean; pinned: boolean;
messages: Message[]; messages: Message[];
_id: string;
} }
export interface IUserDialogInfo export interface IUserDialogInfo
{ {
_id: string; _id: string;
aid: number;
Info: IUserDialogDetails; Info: IUserDialogDetails;
} }

View File

@ -134,7 +134,10 @@ export class GiftService
const details: ISendMessageDetails = { const details: ISendMessageDetails = {
recipientId: playerId, recipientId: playerId,
sender: this.getMessageType(giftData), sender: this.getMessageType(giftData),
senderDetails: { _id: this.getSenderId(giftData), Info: null }, senderDetails: {
_id: this.getSenderId(giftData),
aid: 1234567, // TODO - pass proper aid value
Info: null },
messageText: giftData.messageText, messageText: giftData.messageText,
items: giftData.items, items: giftData.items,
itemsMaxStorageLifetimeSeconds: this.timeUtil.getHoursAsSeconds(giftData.collectionTimeHours), itemsMaxStorageLifetimeSeconds: this.timeUtil.getHoursAsSeconds(giftData.collectionTimeHours),

View File

@ -13,6 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { LocalisationService } from "@spt-aki/services/LocalisationService";
import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService";
import { HashUtil } from "@spt-aki/utils/HashUtil";
import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil";
@injectable() @injectable()
@ -22,6 +23,7 @@ export class PmcChatResponseService
constructor( constructor(
@inject("WinstonLogger") protected logger: ILogger, @inject("WinstonLogger") protected logger: ILogger,
@inject("HashUtil") protected hashUtil: HashUtil,
@inject("RandomUtil") protected randomUtil: RandomUtil, @inject("RandomUtil") protected randomUtil: RandomUtil,
@inject("NotificationSendHelper") protected notificationSendHelper: NotificationSendHelper, @inject("NotificationSendHelper") protected notificationSendHelper: NotificationSendHelper,
@inject("MatchBotDetailsCacheService") protected matchBotDetailsCacheService: MatchBotDetailsCacheService, @inject("MatchBotDetailsCacheService") protected matchBotDetailsCacheService: MatchBotDetailsCacheService,
@ -95,6 +97,7 @@ export class PmcChatResponseService
const killerDetails: IUserDialogInfo = { const killerDetails: IUserDialogInfo = {
_id: killerDetailsInCache._id, _id: killerDetailsInCache._id,
aid: this.hashUtil.generateAccountId(), // TODO- pass correct value
Info: { Info: {
Nickname: killerDetailsInCache.Info.Nickname, Nickname: killerDetailsInCache.Info.Nickname,
Side: killerDetailsInCache.Info.Side, Side: killerDetailsInCache.Info.Side,
@ -273,6 +276,7 @@ export class PmcChatResponseService
]; ];
return { return {
_id: pmcVictim.Name, _id: pmcVictim.Name,
aid: this.hashUtil.generateAccountId(), // TODO- pass correct value
Info: { Info: {
Nickname: pmcVictim.Name, Nickname: pmcVictim.Name,
Level: pmcVictim.Level, Level: pmcVictim.Level,