Skip to content

Add support for 'relates_to' in GenericHook#1106

Open
gamedolphin wants to merge 6 commits intomatrix-org:mainfrom
gamedolphin:patch-1
Open

Add support for 'relates_to' in GenericHook#1106
gamedolphin wants to merge 6 commits intomatrix-org:mainfrom
gamedolphin:patch-1

Conversation

@gamedolphin
Copy link
Copy Markdown

This pull request makes a minor enhancement to the GenericHookConnection class, adding support for including a new property in the message content if present.

  • Added support for the relates_to property in the outgoing message content, allowing messages to include relation information when available.

Signed-off-by: Sandeep Nambiar <contact@sandeepnambiar.com>
@gamedolphin gamedolphin requested a review from a team as a code owner November 23, 2025 22:07
Signed-off-by: Sandeep Nambiar <contact@sandeepnambiar.com>
Signed-off-by: Sandeep Nambiar <contact@sandeepnambiar.com>
Signed-off-by: Sandeep Nambiar <contact@sandeepnambiar.com>
Signed-off-by: Sandeep Nambiar <contact@sandeepnambiar.com>
Fix this type check

Signed-off-by: Sandeep Nambiar <contact@sandeepnambiar.com>
Copy link
Copy Markdown
Contributor

@Half-Shot Half-Shot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, but can we also get a test. Either a unit or integration test will do :)

}

if (typeof safeData?.relates_to === "object") {
msg.relates_to = safeData.relates_to ?? undefined;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs stronger validation, at least checking whether the object looks like a relates_to object?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants