Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkeye64 committed Feb 25, 2021
2 parents 1b12a7c + cdcb70b commit afaf54c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ class Camera {
}
}

if (this.events) {
if (this.events && this.analytics) {
if ('WSPullPointSupport' in events && events.WSPullPointSupport === 'true') {
this.analytics.wsPullPointSupport = true;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ class Camera {
this.events.init(this.timeDiff, serviceAddress, this.username, this.password)
}
}
if (this.events) {
if (this.events && this.analytics) {
if ('WSPullPointSupport' in events && events.WSPullPointSupport === 'true') {
this.analytics.wsPullPointSupport = true
}
Expand Down
8 changes: 6 additions & 2 deletions lib/modules/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,12 @@ class Events extends EventEmitter {

let soapBody = ''
soapBody = '<tev:PullMessages>'
soapBody += '<tev:Timeout>PT1M</tev:Timeout>'
soapBody += '<tev:MessageLimit>99</tev:MessageLimit>'
soapBody += '<tev:Timeout>'
soapBody += timeout
soapBody += '</tev:Timeout>'
soapBody += '<tev:MessageLimit>'
soapBody += messageLimit.toString()
soapBody += '</tev:MessageLimit>'
soapBody += '</tev:PullMessages>'

this.buildRequest('PullMessages', soapBody, subscriptionId)
Expand Down

0 comments on commit afaf54c

Please sign in to comment.