diff --git a/core/server/models/tag.js b/core/server/models/tag.js index d554bd38ca..ae6fa64a01 100644 --- a/core/server/models/tag.js +++ b/core/server/models/tag.js @@ -68,6 +68,24 @@ Tag = ghostBookshelf.Model.extend({ delete attrs.parent_id; return attrs; + }, + + getAction(event, options) { + const actor = this.getActor(options); + + // @NOTE: we ignore internal updates (`options.context.internal`) for now + if (!actor) { + return; + } + + // @TODO: implement context + return { + event: event, + resource_id: this.id || this.previous('id'), + resource_type: 'tag', + actor_id: actor.id, + actor_type: actor.type + }; } }, { orderDefaultOptions: function orderDefaultOptions() {