Skip to content

feat(hawk-js): add setContext and setUser methods#130

Merged
Dobrunia merged 14 commits intomasterfrom
feat/set-context-user
Oct 14, 2025
Merged

feat(hawk-js): add setContext and setUser methods#130
Dobrunia merged 14 commits intomasterfrom
feat/set-context-user

Conversation

@Dobrunia
Copy link
Copy Markdown
Member

Problem: no simple way to update user and context data dynamically in runtime
Changes: implemented setContext and setUser methods

src/catcher.ts Outdated
* Clear current user information
*/
public clearUser(): void {
this.user = null;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

default user id should be generated in this case

src/catcher.ts Outdated
Comment on lines +253 to +255
public getCurrentUser(): AffectedUser | null {
return this.user;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

redundant method

src/catcher.ts Outdated
Comment on lines 276 to 278
public getCurrentContext(): EventContext | undefined {
return this.context;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't see any use case for that.

@Dobrunia Dobrunia merged commit 303502b into master Oct 14, 2025
2 checks passed
@Dobrunia Dobrunia deleted the feat/set-context-user branch October 14, 2025 17:14
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