Skip to content
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

Sync #7

Merged
merged 99 commits into from
Aug 22, 2018
Merged
Changes from 1 commit
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
3f5ffba
Add missing properties for a dialog select element
DominikPalo May 7, 2018
2bbb510
Fix semicolons
DominikPalo May 7, 2018
6317d8c
Merge pull request #549 from DominikPalo/feature/missing-dialog-prope…
aoberoi May 7, 2018
f5a4541
Fix a few inconsistencies in the interface for interactive message ac…
DominikPalo May 7, 2018
290ea7a
Merge pull request #551 from DominikPalo/feature/fix-attachment-actio…
aoberoi May 7, 2018
65ef2b5
fixes type in x-oauth-scopes response header name
aoberoi May 11, 2018
6675917
Merge pull request #554 from aoberoi/webclient-response-scopes
aoberoi May 11, 2018
fa99e28
add websocket close handlers for connecting:authenticated state, stop…
aoberoi May 11, 2018
c0fd185
fix string concatenation
aoberoi May 11, 2018
1722ed5
Merge pull request #555 from aoberoi/rtmclient-wsclose-in-connecting
aoberoi May 11, 2018
cf663c7
v4.2.1
aoberoi May 11, 2018
f90bbd8
Merge pull request #556 from slackapi/rel-v4.2.1
aoberoi May 11, 2018
07116d5
whitelist dist files to avoid publishing private info unintentionally
aoberoi May 12, 2018
69d974f
Merge pull request #557 from aoberoi/npmignore
aoberoi May 12, 2018
97382a3
v4.2.2
aoberoi May 12, 2018
e8a5781
Merge pull request #558 from slackapi/rel-v4.2.2
aoberoi May 12, 2018
84e2c70
handles transitions at parent machine instead of submachine
aoberoi May 12, 2018
e0c1407
adding IncomingWebhookResult to exports
mledom May 15, 2018
b257599
Merge pull request #560 from aoberoi/rtmclient-wsclose-in-connecting-fix
aoberoi May 15, 2018
deafed7
Merge pull request #562 from eletype/export-incoming-webhook-result
aoberoi May 19, 2018
a91d397
RTMClient.start options is optional
christophehurpeau May 25, 2018
28b96e7
add apps.permissions.resources.list, apps.permissions.scopes.list [#565]
ggruiz May 25, 2018
c3b5ae8
add CursorPaginationEnabled
ggruiz May 25, 2018
2cbf2ea
Merge pull request #568 from ggruiz/master
ggruiz May 25, 2018
a920440
modifies rate limit handling functionality, adds tests for it
ggruiz May 31, 2018
97e2456
Merge pull request #567 from christophehurpeau/patch-1
aoberoi May 31, 2018
983f42f
Merge branch 'coverage/webclient-rate-limit-test'
ggruiz May 31, 2018
7086db2
fix line length for lint
ggruiz May 31, 2018
51c0074
add log testing
ggruiz Jun 1, 2018
8d8a115
Merge pull request #570 from ggruiz/master
ggruiz Jun 1, 2018
ec417ab
classifies pagination enabled methods into sets for reflection
aoberoi Jun 3, 2018
ca7b715
Merge branch 'master' into auto-pagination
aoberoi Jun 3, 2018
d8ab1ab
catch errors on platform
ggruiz Jun 4, 2018
623c003
make test for platform errors better
ggruiz Jun 4, 2018
f10a0f8
remove 'only'
ggruiz Jun 4, 2018
24488bb
Merge pull request #573 from ggruiz/master
ggruiz Jun 4, 2018
e9257e7
WIP
aoberoi Jun 5, 2018
4b50d20
v4.3.0
aoberoi Jun 5, 2018
008402b
Merge pull request #574 from slackapi/rel-v4.3.0
aoberoi Jun 5, 2018
1f49016
KeepAlive: adds handling for cases when monitoring may be stopped bef…
aoberoi Jun 6, 2018
22dfc6f
recommendReconnect is not optional
aoberoi Jun 6, 2018
af9b713
improve jsdoc with argument descriptions (linter complained)
aoberoi Jun 6, 2018
5b4f91b
add some logging
aoberoi Jun 6, 2018
265aa97
upgrade ws, stop monitoring on recommend reconnect
aoberoi Jun 6, 2018
3c8789a
Merge pull request #578 from aoberoi/keepalive-inconsistency-issues
aoberoi Jun 7, 2018
5f8abc9
v4.3.1
aoberoi Jun 7, 2018
263f530
Merge pull request #579 from aoberoi/rel-v4.3.1
aoberoi Jun 7, 2018
5d0332f
Link to documentation source
chris-peterson Jun 22, 2018
426c8f8
Merge pull request #584 from chris-peterson/fix_files_upload_reference
aoberoi Jun 22, 2018
f1864c7
Fix Dialog.selected_options type
harveyr Jun 29, 2018
cb07fb5
WIP
aoberoi Jul 3, 2018
1fbc4a8
filter form data fields for undefined values, fixes #587
aoberoi Jul 3, 2018
11510fd
test for undefined fields serialized in form data
aoberoi Jul 3, 2018
f51bdda
Merge pull request #589 from aoberoi/fix-587
aoberoi Jul 3, 2018
b413c5b
the slow march of incremental progress (i hope)
aoberoi Jul 25, 2018
0be2796
progress: webclient existing tests passing
aoberoi Jul 25, 2018
99c7842
resolve linting issues
aoberoi Jul 25, 2018
2bc76cd
Merge branch 'master' into auto-pagination
aoberoi Jul 25, 2018
7aefed2
fixes typescript integration tests, add item to lib
aoberoi Jul 25, 2018
6235309
Merge remote-tracking branch 'aoberoi/auto-pagination' into auto-pagi…
aoberoi Jul 25, 2018
e8ffc33
SelectOption instaed of OptionField
harveyr Jul 31, 2018
219d152
adds tests, includes fixes for reused loggingFunc across instances
aoberoi Aug 1, 2018
d53000d
Merge pull request #588 from harveyr/fix-selected-options-type
aoberoi Aug 2, 2018
6440192
adds new cursor-based pagination methods, adds tests for specific err…
aoberoi Aug 3, 2018
99b27f2
tests for all the pagination warnings
aoberoi Aug 3, 2018
fd5d203
add pageSize config option for WebClient
aoberoi Aug 3, 2018
e28cc36
update documentation for pagination, regenerate docs
aoberoi Aug 4, 2018
4f3fa6a
add WebAPIRateLimitedError and rejectRateLimitedCalls option on WebCl…
aoberoi Aug 4, 2018
5358c02
add test for rejectRateLimitedCalls WebClient config option
aoberoi Aug 4, 2018
8495516
Fix syntax error in web_client.md
moffatethan Aug 4, 2018
b5df464
Add note about log level debug in rtm_client.md
moffatethan Aug 5, 2018
f951a77
Merge pull request #600 from jd0920/jd0920-patch-1
aoberoi Aug 6, 2018
f732f21
Merge pull request #601 from jd0920/jd0920-docs-rtmclient
aoberoi Aug 6, 2018
fec7950
Merge pull request #596 from aoberoi/auto-pagination
aoberoi Aug 6, 2018
fc55cc8
Correct pagination metadata on groups.history
aoberoi Aug 6, 2018
d5fafe7
Merge pull request #602 from slackapi/fix-pagination-groupshistory
aoberoi Aug 6, 2018
792c44d
refactor some rate-limiting tests, add logging to webclient
aoberoi Aug 6, 2018
d8518d3
Merge remote-tracking branch 'origin/master' into reject-retries
aoberoi Aug 6, 2018
5197ee4
move task response handling into request-queue awaited function
aoberoi Aug 6, 2018
5138a8b
update docs for rejectRateLimitedCalls
aoberoi Aug 7, 2018
ba5d1b4
Merge pull request #599 from aoberoi/reject-retries
aoberoi Aug 7, 2018
1bea2a1
allows RTMClient to transition from connecting to disconnecting, fixe…
aoberoi Aug 7, 2018
c2b4ea6
Merge pull request #603 from aoberoi/rtmclient-disconnect-from-connec…
aoberoi Aug 7, 2018
dbfffd3
adds warning for use of deprecated file threads methods, fixes #583
aoberoi Aug 7, 2018
a5e77be
add tests
aoberoi Aug 7, 2018
ea19b46
loosens type constraint on @types/node, fixes #582
aoberoi Aug 7, 2018
cd53dcf
adds node v10 to travis test matrix, fixes #575
aoberoi Aug 7, 2018
81625a4
Merge pull request #606 from aoberoi/test-node-10
aoberoi Aug 8, 2018
ac5ff8c
Merge pull request #604 from aoberoi/warn-file-threads
aoberoi Aug 8, 2018
4820c11
Merge branch 'master' into broad-types-node
aoberoi Aug 8, 2018
cd2c068
copy the util.callbackify types into this package, so we don't depend…
aoberoi Aug 8, 2018
842c7a7
Merge pull request #605 from aoberoi/broad-types-node
aoberoi Aug 8, 2018
7138b83
implement actor enabled methods, fixes #608
aoberoi Aug 9, 2018
5b0dddf
convert user perspective option name from actor to on_behalf_of
aoberoi Aug 10, 2018
4045fda
add docs for on_behalf_of
aoberoi Aug 10, 2018
c1bdf0f
grammar
aoberoi Aug 10, 2018
da4b0ec
Merge pull request #609 from aoberoi/user-data-api
aoberoi Aug 10, 2018
86d4727
v4.4.0
aoberoi Aug 11, 2018
b207d88
Merge pull request #613 from aoberoi/rel-v4.4.0
aoberoi Aug 11, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add websocket close handlers for connecting:authenticated state, stop…
… keepalive during reconnection
  • Loading branch information
aoberoi committed May 11, 2018
commit fa99e285204ab398e7bf96b7dbce869a843458c5
20 changes: 15 additions & 5 deletions src/RTMClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,25 @@ export class RTMClient extends EventEmitter {
});
})
.on('websocket open').transitionTo('handshaking')
.on('websocket close')
.transitionTo('reconnecting').withCondition(() => this.autoReconnect)
.transitionTo('disconnected').withAction(() => {
// this transition circumvents the 'disconnecting' state (since the websocket is already closed), so we
// need to execute its onExit behavior here.
this.teardownWebsocket();
})
.state('handshaking') // a state in which to wait until the 'server hello' event
.on('websocket close')
.transitionTo('reconnecting').withCondition(() => this.autoReconnect)
.withAction((_from, _to, context) => {
this.logger.debug(`reconnecting after unexpected close ${context.eventPayload.reason}
${context.eventPayload.code} with isMonitoring set to ${this.keepAlive.isMonitoring}
this.logger.debug(`reconnecting after unexpected close ${context.eventPayload.reason}
${context.eventPayload.code} with isMonitoring set to ${this.keepAlive.isMonitoring}
and recommendReconnect set to ${this.keepAlive.recommendReconnect}`);
})
.transitionTo('disconnected')
.withAction((_from, _to, context) => {
this.logger.debug(`disconnected after unexpected close ${context.eventPayload.reason}
${context.eventPayload.code} with isMonitoring set to ${this.keepAlive.isMonitoring}
this.logger.debug(`disconnected after unexpected close ${context.eventPayload.reason}
${context.eventPayload.code} with isMonitoring set to ${this.keepAlive.isMonitoring}
and recommendReconnect set to ${this.keepAlive.recommendReconnect}`);
// this transition circumvents the 'disconnecting' state (since the websocket is already closed),
// so we need to execute its onExit behavior here.
Expand Down Expand Up @@ -234,7 +241,10 @@ export class RTMClient extends EventEmitter {
// reconnecting is just like disconnecting, except that the websocket should already be closed before we enter
// this state, and that the next state should be connecting.
.state('reconnecting')
.do(() => Promise.resolve(true))
.do(() => {
this.keepAlive.stop();
return Promise.resolve(true);
})
.onSuccess().transitionTo('connecting')
.onExit(() => this.teardownWebsocket())
.global()
Expand Down