Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cobrowse-sdk-react-native

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cobrowse-sdk-react-native - npm Package Compare versions

Comparing version 2.8.0 to 2.9.0

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

## [2.9.0](https://github.com/cobrowseio/cobrowse-sdk-react-native/compare/v2.8.0...v2.9.0) (2021-11-17)
### Features
* Add support for custom remote control consent prompts ([95e1f36](https://github.com/cobrowseio/cobrowse-sdk-react-native/commit/95e1f361e5c18f8f1ffb7ae6477525aab055cd7c))
## [2.8.0](https://github.com/cobrowseio/cobrowse-sdk-react-native/compare/v2.6.0...v2.8.0) (2021-11-17)

@@ -7,0 +14,0 @@

42

js/CobrowseIO.js

@@ -25,2 +25,4 @@ import { Alert } from 'react-native'

static handleSessionRequest (session) {
if (this._sessionRequestShown) return
this._sessionRequestShown = true
Alert.alert(

@@ -31,10 +33,38 @@ 'Support Request',

text: 'Reject',
onPress: () => session.end(),
onPress: () => {
this._sessionRequestShown = false
session.end()
},
style: 'cancel'
}, {
text: 'Accept',
onPress: () => session.activate()
}], { cancelable: true })
onPress: () => {
this._sessionRequestShown = false
session.activate()
}
}], { cancelable: false })
}
static handleRemoteControlRequest (session) {
if (this._remoteControlRequestShown) return
this._remoteControlRequestShown = true
Alert.alert(
'Remote Control Request',
'A support agent would like to take remote control of this app. Do you accept?',
[{
text: 'Reject',
onPress: () => {
this._remoteControlRequestShown = false
session.setRemoteControl('rejected')
},
style: 'cancel'
}, {
text: 'Accept',
onPress: () => {
this._remoteControlRequestShown = false
session.setRemoteControl('on')
}
}], { cancelable: false })
}
static addListener (event, cb) {

@@ -96,1 +126,7 @@ return emitter.addListener(event, (session) => cb(new Session(session)))

})
CobrowseIO.addListener('session.updated', (session) => {
if (session.isActive() && session.remote_control === 'requested') {
CobrowseIO.handleRemoteControlRequest(session)
}
})

2

package.json
{
"name": "cobrowse-sdk-react-native",
"version": "2.8.0",
"version": "2.9.0",
"description": "Cobrowse SDK for React Native",

@@ -5,0 +5,0 @@ "main": "js/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc