A base implementation of the HipChat web client's SPI to be implemented by native/non-native consumers
Methods
(static) getNotificationPermission()
This method will be called to determine if the default notification permission banner should be displayed
(static) onLogMessage() → {*}
This method is called when web client logs a message. Note: this must be turned on via passing the config property - logging_enabled: true
Returns:
- Type
- *
(static) onNotification(notification) → {*}
This method will be called when a notification should be sent to the user
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
notification |
Object | notification data Properties
|
Returns:
- Type
- *
(static) onPreferencesUpdated() → {*}
This method is called when a user preference has been changed
Returns:
- Type
- *
(static) onTotalUnreadCountUpdate(count, hasMention) → {*}
This method will be called when a notification should be sent to the user
Parameters:
| Name | Type | Description |
|---|---|---|
count |
Integer | the current unread message count |
hasMention |
bool | if any of the unread messages include a user mention |
Returns:
- Type
- *
(static) openExternalWindow(url, name, props) → {*}
This method is called when the web client wants to open a window in the browser. Note, this method is a replacement for the default browser window.open API. In most SPI implementations it will simply wrap window.open.
Parameters:
| Name | Type | Description |
|---|---|---|
url |
string | the url to open |
name |
string | name of the new window |
props |
string | see default window.open browser API for props |
Returns:
- Type
- *
(static) openInternalWindow(url, name, props) → {*}
This method is called when the web client explicitly wants to open a new window owned by HipChat. To be used by video in order to launch a window inside the native wrapper and not the browser. If you would like to open a new browser window see openExternalWindow method.
Parameters:
| Name | Type | Description |
|---|---|---|
url |
string | the url to open |
name |
string | name of the new window |
props |
string | see default window.open browser API for props |
Returns:
- Type
- *
(static) showFeedbackCollector(url) → {*}
This method is called when an external feedback collector is specified and the 'Provide Feedback' action is triggered by the user.
Parameters:
| Name | Type | Description |
|---|---|---|
url |
string | the feedback url to use |
Returns:
- Type
- *
(static) showFileChooser() → {*}
This method is called when the web client is giving the user a file chooser interface
Returns:
- Type
- *
(static) showPreferencesDialog() → {*}
This method is called when a user chooses to show app preference dialog (or window if the implementation enables it)
Returns:
- Type
- *
(inner) buttonClickedProxySettings()
This method is called when the Proxy Settings button is clicked
(inner) focusApp()
Called when we want to bring the app to the foreground due to some activity (e.g. dropping a file on the app)
(inner) getLastServerUrl()
This method is called by the service selector when it is time to get the default value for lastServerUrl. It is native only.
(inner) onAppStateReady(config)
Fired when the preloader is dismissed and the application has fully loaded Is passed the completed application configuration, including preferences. See ConfigurationModel
Parameters:
| Name | Type | Description |
|---|---|---|
config |
ConfigurationModel |
(inner) onCloudLoginShow()
This method is called by the service selector when the cloud login page is going to be shown. It is native only.
(inner) onDesktop4DialogShown()
This method is called when the Desktop 4 release dialog is shown
(inner) onHostRequestTimeout()
Called when web core requests begin timing out
(inner) onInternalTokenRefreshed(token)
This method is called when the internal token is updated
Parameters:
| Name | Type | Description |
|---|---|---|
token |
string | the new internal token data |
(inner) onLegacyDownloadLinkClicked()
This method is called by the service selector when a user will be sent to download the legacy client. It is native only.
(inner) onLoginToAnotherTeam()
This method is called when a user select login into another team
(inner) onReconnectionError(error)
Fired when an error is caught when trying to re-establish a session on reconnection
Parameters:
| Name | Type | Description |
|---|---|---|
error |
string |
(inner) onServerLoginShow()
This method is called by the service selector when the server login verification page is going to be shown. It is native only.
(inner) onServerOauthLogin()
This method is called by the service selector when it is time to do the server oauth login flow. It is native only.
(inner) onSignOut(hc, data)
This method is called when a user is signing out
Parameters:
| Name | Type | Description |
|---|---|---|
hc |
object | HipChat client instance |
data |
object | sign out data |
(inner) onStropheAuthFailed(error)
Fired when Strophe returns a status of CONNFAIL or AUTHFAIL with a condition when the connection changes
Parameters:
| Name | Type | Description |
|---|---|---|
error |
string |
(inner) onStropheConnectionFailed(error)
Fired when Strophe returns a status of CONNFAIL or AUTHFAIL without a condition when the connection changes
Parameters:
| Name | Type | Description |
|---|---|---|
error |
string |
(inner) onStrophePolicyViolation(data)
Fired when Strophe hits the 10 concurrent client max and session limit is reached.
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
data |
object |
Properties
|
(inner) onUnrecoverableError(type)
This method is called when an unrecoverable error is encountered
Parameters:
| Name | Type | Description |
|---|---|---|
type |
string | the error type encountered |