Skip to content

Commit

Permalink
Backpack Bug Fix
Browse files Browse the repository at this point in the history
Fixed bug that caused objects updated in storage units to show up in backpacks if the user had their backpack open in chat.
  • Loading branch information
SalleeMatthew authored and dburleson committed Sep 4, 2024
1 parent 4e756dd commit 013cb88
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions spa/src/components/Chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -769,10 +769,14 @@ export default Vue.extend({
return obj.id !== parseInt(object.obj_id);
});
const updatedObject = await this.$http.get(`/object_instance/${ object.obj_id }/properties/`);
if(this.activePanel === 'backpack' && [object.member_username, object.buyer_username].includes(this.$store.data.user.username)){
if(this.activePanel === 'backpack' &&
object.place_id === 0 &&
[object.member_username, object.buyer_username].includes(this.$store.data.user.username)){
this.backpackObjects.push(updatedObject.data.objectInstance[0]);
}
if(this.activePanel === 'userBackpack' && [object.member_username, object.buyer_username].includes(this.username)){
if(this.activePanel === 'userBackpack' &&
object.place_id === 0 &&
[object.member_username, object.buyer_username].includes(this.username)){
this.backpackObjects.push(updatedObject.data.objectInstance[0]);
}
}
Expand Down

0 comments on commit 013cb88

Please sign in to comment.