Skip to content

Commit

Permalink
Use correct publish key for pubnub yale home
Browse files Browse the repository at this point in the history
  • Loading branch information
seime committed Nov 25, 2023
1 parent 0682b07 commit e302c35
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ public void init(String userIdString, PubNubListener messageListener, EcoSystem
throws PubNubMessageException {

try {
final UserId userId = new UserId("fn-" + userIdString.toUpperCase(Locale.ROOT));
final UserId userId = new UserId("pn-" + userIdString.toUpperCase(Locale.ROOT));
PNConfiguration pnConfiguration = new PNConfiguration(userId);
pnConfiguration.setSubscribeKey(ecoSystem.getPubNubSubscribeKey());
pnConfiguration.setPublishKey(ecoSystem.getPubNubPublishKey());
pnConfiguration.setReconnectionPolicy(PNReconnectionPolicy.EXPONENTIAL);
pnConfiguration.setMaximumReconnectionRetries(100);
pnConfiguration.setLogVerbosity(PNLogVerbosity.BODY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,21 @@
* @author Arne Seime - Initial contribution
*/
public enum EcoSystem {
AUGUST("https://api-production.august.com", "sub-c-1030e062-0ebe-11e5-a5c2-0619f8945a4f"),
YALE_HOME("https://api.aaecosystem.com", "sub-c-c9c38d4d-5796-46c9-9262-af20cf6a1d42");
AUGUST("https://api-production.august.com", "sub-c-1030e062-0ebe-11e5-a5c2-0619f8945a4f",
"pub-c-567d7f2d-270a-438a-a785-f0af12ad8312"),
YALE_HOME("https://api.aaecosystem.com", "sub-c-c9c38d4d-5796-46c9-9262-af20cf6a1d42",
"pub-c-353e8881-cf58-4b26-9baf-96f296de0677");

private final String url;

private final String pubNubSubscribeKey;

EcoSystem(String url, String pubNubSubscribeKey) {
private final String pubNubPublishKey;

EcoSystem(String url, String pubNubSubscribeKey, String pubNubPublishKey) {
this.url = url;
this.pubNubSubscribeKey = pubNubSubscribeKey;
this.pubNubPublishKey = pubNubPublishKey;
}

public String getUrl() {
Expand All @@ -38,4 +43,8 @@ public String getUrl() {
public String getPubNubSubscribeKey() {
return pubNubSubscribeKey;
}

public String getPubNubPublishKey() {
return pubNubPublishKey;
}
}

0 comments on commit e302c35

Please sign in to comment.