Skip to content

Commit a185f1b

Browse files
seynadioclaude
andcommitted
Fix processHistoricalEvent implementation in Gorgias ticket message source
- Add missing processHistoricalEvent method to ticket-message-created source - Remove empty deploy hook override that was preventing historical event processing - Add getMessage method to Gorgias OAuth app for retrieving individual messages Resolves 'processHistoricalEvent is not implemented' error when creating New Internal Note Created webhook source. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b93534d commit a185f1b

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

components/gorgias_oauth/gorgias_oauth.app.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,14 @@ export default {
401401
...opts,
402402
});
403403
},
404+
async getMessage({
405+
$, id,
406+
}) {
407+
return this._makeRequest({
408+
$,
409+
path: `messages/${id}`,
410+
});
411+
},
404412
createMessage({
405413
ticketId, ...opts
406414
}) {

components/gorgias_oauth/sources/ticket-message-created/ticket-message-created.mjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export default {
4949
},
5050
hooks: {
5151
...base.hooks,
52-
deploy() {},
5352
},
5453
methods: {
5554
...base.methods,
@@ -63,6 +62,14 @@ export default {
6362
&& (!this.sender || message.sender.email === this.sender)
6463
&& (!this.receiver || message.receiver.email === this.receiver);
6564
},
65+
async processHistoricalEvent(event) {
66+
const message = await this.gorgias_oauth.getMessage({
67+
id: event.object_id,
68+
});
69+
return {
70+
message,
71+
};
72+
},
6673
async processEvent(event) {
6774
const { message } = event;
6875
if (this.isRelevant(message)) {

0 commit comments

Comments
 (0)