Skip to content

Commit

Permalink
Merge pull request #98 from pubnub/develop
Browse files Browse the repository at this point in the history
Make publish key optional on subscribe
  • Loading branch information
crimsonred committed Jan 27, 2020
2 parents 5c6c39e + 778a97b commit 1f3cb72
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 9 deletions.
9 changes: 8 additions & 1 deletion .pubnub.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
---
changelog:
-
changes:
-
text: "Make publish key optional on subscribe"
type: bug
date: Jan 24, 20
version: v4.6.2
-
changes:
-
Expand Down Expand Up @@ -499,4 +506,4 @@ supported-platforms:
- "Mac OS X 10.8 or later, amd64"
- "Windows 7 or later, amd64, 386"
version: "PubNub Go SDK"
version: v4.6.1
version: v4.6.2
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## [v4.6.2](https://github.com/pubnub/go/tree/v4.6.2)
January-22-2020

## [v4.6.1](https://github.com/pubnub/go/tree/v4.6.1)
December-30-2019
January-3-2020

## [v4.6.0](https://github.com/pubnub/go/tree/v4.6.0)
December-17-2019
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PubNub 4.6.1 client for Go
# PubNub 4.6.2 client for Go
* Go (1.9+)

# Please direct all Support Questions and Concerns to Support@PubNub.com
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.6.1
4.6.2
2 changes: 1 addition & 1 deletion pubnub.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
// Default constants
const (
// Version :the version of the SDK
Version = "4.6.1"
Version = "4.6.2"
// MaxSequence for publish messages
MaxSequence = 65535
)
Expand Down
3 changes: 0 additions & 3 deletions subscribe_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ func (o *subscribeOpts) context() Context {
}

func (o *subscribeOpts) validate() error {
if o.config().PublishKey == "" {
return newValidationError(o, StrMissingPubKey)
}

if o.config().SubscribeKey == "" {
return newValidationError(o, StrMissingSubKey)
Expand Down
2 changes: 1 addition & 1 deletion subscribe_request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func TestSubscribeValidatePublishKey(t *testing.T) {
pubnub: pn,
}

assert.Equal("pubnub/validation: pubnub: \x01: Missing Publish Key", opts.validate().Error())
assert.Nil(opts.validate())
}

func TestSubscribeValidateCHAndCG(t *testing.T) {
Expand Down

0 comments on commit 1f3cb72

Please sign in to comment.