diff --git a/project/src/controllers/DialogueController.ts b/project/src/controllers/DialogueController.ts index 17237ea6..0a7b8c0d 100644 --- a/project/src/controllers/DialogueController.ts +++ b/project/src/controllers/DialogueController.ts @@ -141,6 +141,7 @@ export class DialogueController dialog.Users.push({ _id: profile.characters.pmc.sessionId, + aid: profile.characters.pmc.aid, Info: { Level: profile.characters.pmc.Info.Level, Nickname: profile.characters.pmc.Info.Nickname, @@ -235,6 +236,7 @@ export class DialogueController const pmcProfile = fullProfile.characters.pmc; result.push({ _id: fullProfile.info.id, + aid: fullProfile.info.aid, Info: { Nickname: pmcProfile.Info.Nickname, Side: pmcProfile.Info.Side, diff --git a/project/src/helpers/Dialogue/CommandoDialogueChatBot.ts b/project/src/helpers/Dialogue/CommandoDialogueChatBot.ts index 32b383c4..c000d186 100644 --- a/project/src/helpers/Dialogue/CommandoDialogueChatBot.ts +++ b/project/src/helpers/Dialogue/CommandoDialogueChatBot.ts @@ -34,6 +34,7 @@ export class CommandoDialogueChatBot implements IDialogueChatBot { return { _id: "sptCommando", + aid: 1234567, Info: { Level: 1, MemberCategory: MemberCategory.DEVELOPER, Nickname: "Commando", Side: "Usec" }, }; } diff --git a/project/src/helpers/Dialogue/SptDialogueChatBot.ts b/project/src/helpers/Dialogue/SptDialogueChatBot.ts index 119e9234..d6d03527 100644 --- a/project/src/helpers/Dialogue/SptDialogueChatBot.ts +++ b/project/src/helpers/Dialogue/SptDialogueChatBot.ts @@ -32,6 +32,7 @@ export class SptDialogueChatBot implements IDialogueChatBot { return { _id: "sptFriend", + aid: 1234566, Info: { Level: 1, MemberCategory: MemberCategory.DEVELOPER, diff --git a/project/src/models/eft/profile/IAkiProfile.ts b/project/src/models/eft/profile/IAkiProfile.ts index 770ca2f5..a40606d5 100644 --- a/project/src/models/eft/profile/IAkiProfile.ts +++ b/project/src/models/eft/profile/IAkiProfile.ts @@ -102,17 +102,18 @@ export interface IDefaultEquipmentPreset extends IUserBuild export interface Dialogue { attachmentsNew: number; - type: MessageType; new: number; - _id: string; + type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; messages: Message[]; + _id: string; } export interface IUserDialogInfo { _id: string; + aid: number; Info: IUserDialogDetails; } diff --git a/project/src/services/GiftService.ts b/project/src/services/GiftService.ts index 92175368..266f605d 100644 --- a/project/src/services/GiftService.ts +++ b/project/src/services/GiftService.ts @@ -134,7 +134,10 @@ export class GiftService const details: ISendMessageDetails = { recipientId: playerId, 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, items: giftData.items, itemsMaxStorageLifetimeSeconds: this.timeUtil.getHoursAsSeconds(giftData.collectionTimeHours), diff --git a/project/src/services/PmcChatResponseService.ts b/project/src/services/PmcChatResponseService.ts index 6cf68781..c0cdba66 100644 --- a/project/src/services/PmcChatResponseService.ts +++ b/project/src/services/PmcChatResponseService.ts @@ -13,6 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; +import { HashUtil } from "@spt-aki/utils/HashUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @injectable() @@ -22,6 +23,7 @@ export class PmcChatResponseService constructor( @inject("WinstonLogger") protected logger: ILogger, + @inject("HashUtil") protected hashUtil: HashUtil, @inject("RandomUtil") protected randomUtil: RandomUtil, @inject("NotificationSendHelper") protected notificationSendHelper: NotificationSendHelper, @inject("MatchBotDetailsCacheService") protected matchBotDetailsCacheService: MatchBotDetailsCacheService, @@ -95,6 +97,7 @@ export class PmcChatResponseService const killerDetails: IUserDialogInfo = { _id: killerDetailsInCache._id, + aid: this.hashUtil.generateAccountId(), // TODO- pass correct value Info: { Nickname: killerDetailsInCache.Info.Nickname, Side: killerDetailsInCache.Info.Side, @@ -273,6 +276,7 @@ export class PmcChatResponseService ]; return { _id: pmcVictim.Name, + aid: this.hashUtil.generateAccountId(), // TODO- pass correct value Info: { Nickname: pmcVictim.Name, Level: pmcVictim.Level,