Skip to content

Commit

Permalink
Add pn_ prefix (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
kleewho authored Mar 10, 2023
1 parent d88b713 commit f87a80a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PAM_PUBLISH_KEY: ${{ secrets.PAM_PUBLISH_KEY }}
PAM_SUBSCRIBE_KEY: ${{ secrets.PAM_SUBSCRIBE_KEY }}
PAM_SECRET_KEY: ${{ secrets.PAM_SECRET_KEY }}
PUBLISH_KEY: ${{ secrets.PUBLISH_KEY }}
SUBSCRIBE_KEY: ${{ secrets.SUBSCRIBE_KEY }}
PAM_PUBLISH_KEY: ${{ secrets.SDK_PAM_PUB_KEY }}
PAM_SUBSCRIBE_KEY: ${{ secrets.SDK_PAM_SUB_KEY }}
PAM_SECRET_KEY: ${{ secrets.SDK_PAM_SEC_KEY }}
PUBLISH_KEY: ${{ secrets.SDK_PUB_KEY }}
SUBSCRIBE_KEY: ${{ secrets.SDK_SUB_KEY }}
defaults:
run:
shell: bash
Expand Down
10 changes: 5 additions & 5 deletions enums.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,17 @@ type PNMessageType int
func (pnMessageType PNMessageType) toMessageType() MessageType {
switch pnMessageType {
case PNMessageTypeObjects:
return "object"
return "pn_object"
case PNMessageTypeFile:
return "file"
return "pn_file"
case PNMessageTypeSignal:
return "signal"
return "pn_signal"
case PNMessageTypeMessageActions:
return "messageAction"
return "pn_messageAction"
case PNMessageTypeMessage:
fallthrough
default:
return "message"
return "pn_message"
}
}

Expand Down
2 changes: 1 addition & 1 deletion fetch_request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ func FetchResponseCommonForMessageTypeAndUUID(t *testing.T, withCipher bool) {
if m0 != nil {
assert.Equal("my-message", m0[0].Message)
assert.Equal("15959610984115342", m0[0].Timetoken)
assert.Equal(MessageType("file"), m0[0].MessageType)
assert.Equal(MessageType("pn_file"), m0[0].MessageType)
assert.Equal("db9c5e39-7c95-40f5-8d71-125765b6f561", m0[0].UUID)
} else {
assert.Fail("m0 nil")
Expand Down
2 changes: 1 addition & 1 deletion subscription_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ func Test_processNonPresencePayload_messageType(t *testing.T) {
{
name: "If custom message type is not set the default is pnMessageType",
args: messageTypes{pnMessageType: PNMessageTypeMessage},
expectedMessageType: "message",
expectedMessageType: "pn_message",
},
{
name: "If custom message type is set it's the value of messageType",
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/files_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func FileUploadCommon(t *testing.T, useCipher bool, customCipher string, filepat
if enableDebuggingInTests {
fmt.Println("pubnub.PNPublishMessage", msg.Text)
}
if msg.Text == message && file.ID == id && file.Name == name && chMessages[i].MessageType == "file" && chMessages[i].UUID == pn.Config.UUID {
if msg.Text == message && file.ID == id && file.Name == name && chMessages[i].MessageType == "pn_file" && chMessages[i].UUID == pn.Config.UUID {
bFoundInFetch = true
break
}
Expand Down

0 comments on commit f87a80a

Please sign in to comment.