-
Notifications
You must be signed in to change notification settings - Fork 63
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
Change message type to type. Type do not have fallback #152
Conversation
e27842d
to
a25f2ba
Compare
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.
LGTM - few questions
} else { | ||
histItem.MessageType = "" | ||
o.pubnub.Config.Log.Printf("histResponse message_type nil") |
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.
Is that println expected?
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.
I'll check that
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.
Apparently this is how this code worked before. I'm not actually changing that. This is how it looks like straight on master
@@ -725,7 +719,7 @@ func processSubscribePayload(m *SubscriptionManager, payload subscribeMessage) { | |||
} | |||
} | |||
|
|||
func createPNFilesEvent(filePayload interface{}, m *SubscriptionManager, actualCh, subscribedCh, channel, subscriptionMatch, issuingClientID string, userMetadata interface{}, timetoken int64, messageType MessageType, spaceId SpaceId) *PNFilesEvent { | |||
func createPNFilesEvent(filePayload interface{}, m *SubscriptionManager, actualCh, subscribedCh, channel, subscriptionMatch, issuingClientID string, userMetadata interface{}, timetoken int64, typ string, spaceId SpaceId) *PNFilesEvent { |
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.
Is that a typo?
func createPNFilesEvent(filePayload interface{}, m *SubscriptionManager, actualCh, subscribedCh, channel, subscriptionMatch, issuingClientID string, userMetadata interface{}, timetoken int64, typ string, spaceId SpaceId) *PNFilesEvent { | |
func createPNFilesEvent(filePayload interface{}, m *SubscriptionManager, actualCh, subscribedCh, channel, subscriptionMatch, issuingClientID string, userMetadata interface{}, timetoken int64, type string, spaceId SpaceId) *PNFilesEvent { |
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.
Nope. I had plenty of options to choose from, but type
is not one of them. It's a reserved keyword so we need to be creative with words :)
@@ -757,7 +751,7 @@ func createPNFilesEvent(filePayload interface{}, m *SubscriptionManager, actualC | |||
Publisher: issuingClientID, | |||
UserMetadata: userMetadata, | |||
SpaceId: spaceId, | |||
MessageType: messageType, | |||
Type: typ, |
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.
same here?
Type: typ, | |
Type: type, |
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.
As stated in previous comment. Not typo. Keyword. That's just life :D
No description provided.