Issue 80 Chatmessage fix (#81)

* fix chatmessage to render the template in constructor. Update namespaces.

* update all chat messages to render templates
This commit is contained in:
IrkTheImp 2025-05-30 04:13:08 -05:00 committed by GitHub
parent c94051744a
commit 7c792f409f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 230 additions and 171 deletions

View file

@ -70,13 +70,16 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV
const cls = getDocumentClass('ChatMessage');
const msg = new cls({
user: game.user.id,
content: await renderTemplate('systems/daggerheart/templates/chat/downtime.hbs', {
player: this.actor.name,
title: game.i18n.localize(this.selectedActivity.name),
img: this.selectedActivity.img,
description: game.i18n.localize(this.selectedActivity.description),
refreshedFeatures: refreshedFeatures
})
content: await foundry.applications.handlebars.renderTemplate(
'systems/daggerheart/templates/chat/downtime.hbs',
{
player: this.actor.name,
title: game.i18n.localize(this.selectedActivity.name),
img: this.selectedActivity.img,
description: game.i18n.localize(this.selectedActivity.description),
refreshedFeatures: refreshedFeatures
}
)
});
cls.create(msg.toObject());