-
Notifications
You must be signed in to change notification settings - Fork 2
Support contact queries by ref #781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for obfuscated ID handling by implementing a configurable obfuscation key system. The key functionality enables contact queries to be performed using obfuscated references instead of direct database IDs.
- Adds ID obfuscation key configuration and parsing functionality
- Integrates obfuscation key into organization environment for flow execution
- Updates dependency to goflow v0.255.6 which likely includes contact reference support
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
runtime/config.go | Adds IDObfuscationKey field and hex parsing method |
runtime/config_test.go | Tests for the ID obfuscation key parsing functionality |
core/models/org.go | Integrates obfuscation key into organization environment |
core/models/org_test.go | Updates tests to pass config to LoadOrg calls |
core/models/assets.go | Updates LoadOrg call to include config parameter |
go.mod | Updates goflow dependency to v0.255.6 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@@ -91,6 +91,22 @@ type Org struct { | |||
env envs.Environment | |||
} | |||
|
|||
// Enviroment allows overriding values from config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Environment" is misspelled as "Enviroment" in the comment.
// Enviroment allows overriding values from config | |
// Environment allows overriding values from config |
Copilot uses AI. Check for mistakes.
0x000A3B1C, // first 4 bytes | ||
0x000D2E3F, // second 4 bytes | ||
0x0001A2B3, // third 4 bytes | ||
0x00C0FFEE, // fourth 4 bytes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The expected values in the test don't match the input hex string. The hex string '000A3B1C000D2E3F0001A2B300C0FFEE' should produce [0x000A3B1C, 0x000D2E3F, 0x0001A2B3, 0x00C0FFEE] but the test expects different values without the leading zeros.
Copilot uses AI. Check for mistakes.
@@ -42,22 +42,24 @@ func TestLoadOrg(t *testing.T) { | |||
assert.Equal(t, envs.DateFormatDayMonthYear, org.Environment().DateFormat()) | |||
assert.Equal(t, envs.TimeFormatHourMinute, org.Environment().TimeFormat()) | |||
assert.Equal(t, envs.RedactionPolicyNone, org.Environment().RedactionPolicy()) | |||
assert.Equal(t, [4]uint32{0xA3B1C, 0xD2E3F, 0x1A2B3, 0xC0FFEE}, org.Environment().ObfuscationKey()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The expected obfuscation key values don't match the default configuration. The default key '000A3B1C000D2E3F0001A2B300C0FFEE' should produce [0x000A3B1C, 0x000D2E3F, 0x0001A2B3, 0x00C0FFEE] but the test expects values without leading zeros.
Copilot uses AI. Check for mistakes.
assert.NoError(t, err) | ||
assert.True(t, org.Suspended()) | ||
assert.Equal(t, "", org.FlowSMTP()) | ||
assert.Equal(t, envs.DateFormatMonthDayYear, org.Environment().DateFormat()) | ||
assert.Equal(t, []i18n.Language{}, org.Environment().AllowedLanguages()) | ||
assert.Equal(t, i18n.NilLanguage, org.Environment().DefaultLanguage()) | ||
assert.Equal(t, i18n.NilLocale, org.Environment().DefaultLocale()) | ||
assert.Equal(t, [4]uint32{0xA3B1C, 0xD2E3F, 0x1A2B3, 0xC0FFEE}, org.Environment().ObfuscationKey()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The expected obfuscation key values don't match the default configuration. The default key '000A3B1C000D2E3F0001A2B300C0FFEE' should produce [0x000A3B1C, 0x000D2E3F, 0x0001A2B3, 0x00C0FFEE] but the test expects values without leading zeros.
Copilot uses AI. Check for mistakes.
No description provided.