Socket
Socket
Sign inDemoInstall

@meetelise/chat

Package Overview
Dependencies
Maintainers
1
Versions
355
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@meetelise/chat - npm Package Compare versions

Comparing version 1.0.0-rc.4 to 1.0.0-rc.5

src/getChatID.ts

6

package.json
{
"name": "@meetelise/chat",
"version": "1.0.0-rc.4",
"version": "1.0.0-rc.5",
"description": "",

@@ -25,2 +25,3 @@ "main": "dist/index.js",

"devDependencies": {
"@types/uuid": "^8.3.1",
"concurrently": "^6.2.0",

@@ -31,4 +32,5 @@ "esbuild": "^0.12.15",

"dependencies": {
"talkjs": "^0.14.5"
"talkjs": "^0.14.5",
"uuid": "^8.3.2"
}
}

@@ -10,1 +10,18 @@ # chat-ui

```
### Bookmarklet
To preview the production chat widget on an ad-hoc website, you can use a bookmarklet. Create a bookmark in your browser, but instead of pasting in an http(s) URL, paste in the following code:
```js
javascript:((d) => {
const s = d.createElement('script');
s.type = 'module';
let p = prompt('Enter an org/building URL pair', 'bainbridge/930-central-flats');
if (!p) return;
s.src=`https://unpkg.com/@meetelise/chat#${p}`;
d.body.appendChild(s);
})(document);
```
This bookmarklet will not work on some pages due to Content Security Policy (CSP) settings, but it will work on <https://get.meetelise.com/demo>.
import Talk from 'talkjs';
import { Building } from './fetchBuildingInfo';
import { getChatID } from './getChatID';

@@ -7,3 +8,3 @@ export async function startTalkJS(building: Building): Promise<void> {

const me = new Talk.User({
id: `lead_${(Math.random() * 1e8).toFixed(0)}`,
id: 'anonymous',
name: 'Me',

@@ -25,9 +26,10 @@ email: null,

});
const conversation = session.getOrCreateConversation(
Talk.oneOnOneId(me, agent)
);
const conversation = session.getOrCreateConversation(getChatID());
conversation.setParticipant(me);
conversation.setParticipant(agent);
conversation.custom = {
buildingId: building.id.toString(),
};
const popup = session.createPopup(conversation);
return popup.mount({ show: false });
}
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