Fixed so that chatMessages always get actor data available (#1519)

This commit is contained in:
WBHarry 2026-01-09 17:35:00 +01:00 committed by GitHub
parent e7cf6594b6
commit 4e18ed8270
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -272,12 +272,17 @@ export function ActionMixin(Base) {
itemOrigin: this.item,
description: this.description || (this.item instanceof Item ? this.item.system.description : '')
};
const speaker = cls.getSpeaker();
const msg = {
type: 'abilityUse',
user: game.user.id,
actor: { name: this.actor.name, img: this.actor.img },
author: this.author,
speaker: cls.getSpeaker(),
speaker: {
speaker,
actor: speaker.actor ?? this.actor
},
title: game.i18n.localize('DAGGERHEART.UI.Chat.action.title'),
system: systemData,
content: await foundry.applications.handlebars.renderTemplate(