When StoreMyAttachmentsOnly is set, Drop all other objects as soon as we know our agent localID
This commit is contained in:
@@ -127,6 +127,18 @@ export class ObjectStoreFull implements IObjectStore
|
||||
if (this.objects[localID].PCode === PCode.Avatar && this.objects[localID].FullID.toString() === this.agent.agentID.toString())
|
||||
{
|
||||
this.agent.localID = localID;
|
||||
|
||||
if (this.options & BotOptionFlags.StoreMyAttachmentsOnly)
|
||||
{
|
||||
Object.keys(this.objectsByParent).forEach((objParentID: string) =>
|
||||
{
|
||||
const parent = parseInt(objParentID, 10);
|
||||
if (parent !== this.agent.localID)
|
||||
{
|
||||
this.deleteObject(parent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.readExtraParams(objData.ExtraParams, 0, this.objects[localID]);
|
||||
|
||||
@@ -86,6 +86,18 @@ export class ObjectStoreLite implements IObjectStore
|
||||
if (objData.PCode === PCode.Avatar && this.objects[localID].FullID.toString() === this.agent.agentID.toString())
|
||||
{
|
||||
this.agent.localID = localID;
|
||||
|
||||
if (this.options & BotOptionFlags.StoreMyAttachmentsOnly)
|
||||
{
|
||||
Object.keys(this.objectsByParent).forEach((objParentID: string) =>
|
||||
{
|
||||
const parent = parseInt(objParentID, 10);
|
||||
if (parent !== this.agent.localID)
|
||||
{
|
||||
this.deleteObject(parent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.objectsByUUID[objData.FullID.toString()] = localID;
|
||||
|
||||
Reference in New Issue
Block a user