Skip to content

Commit

Permalink
Merge pull request #174 from OpenAssistantGPT/feat/post-message-on-pa…
Browse files Browse the repository at this point in the history
…rent-for-message

feat: send message on parent window on new mesage
  • Loading branch information
marcolivierbouch authored Nov 27, 2024
2 parents 29ff134 + b7910da commit e132713
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/long-rocks-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@openassistantgpt/ui': patch
---

Send message to parent window on message sent
2 changes: 2 additions & 0 deletions packages/ui/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ export function OpenAssistantGPTChat({
function handleSubmitMessage(e: React.FormEvent<HTMLFormElement>) {
e.preventDefault();

window.parent.postMessage('messageSent', '*');

submitMessage();
}

Expand Down

0 comments on commit e132713

Please sign in to comment.