Skip to content

Commit

Permalink
remove topic field from validator
Browse files Browse the repository at this point in the history
  • Loading branch information
om26er committed Jul 2, 2024
1 parent 316020c commit ad4e245
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion messages/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (e *Publish) Parse(wampMsg []any) error {

e.PublishFields = &publishFields{
requestID: fields.RequestID,
topic: fields.Topic,
topic: fields.URI,
args: fields.Args,
kwArgs: fields.KwArgs,
}
Expand Down
2 changes: 1 addition & 1 deletion messages/subscribe.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (s *Subscribe) Parse(wampMsg []any) error {
return fmt.Errorf("subscribe: failed to validate message %s: %w", MessageNameSubscribe, err)
}

s.SubscribeFields = &subscribeFields{requestID: fields.RequestID, options: fields.Options, topic: fields.Topic}
s.SubscribeFields = &subscribeFields{requestID: fields.RequestID, options: fields.Options, topic: fields.URI}

return nil
}
Expand Down
1 change: 0 additions & 1 deletion messages/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ type Fields struct {
MessageType int64
Signature string
Reason string
Topic string

Extra map[string]any
Options map[string]any
Expand Down

0 comments on commit ad4e245

Please sign in to comment.