@startinblox/component-chat
v7.1.5
Published
Solid XMPP Chat Web Component
Downloads
564
Keywords
Readme
Solid XMPP Chat
Solid XMPP Chat is an XMPP client based on Web Component and the ConverseJS library.
The goal of Solid XMPP Chat, and its family of web components, is to allow you to deploy a chat on your application by adding a single <solid-xmpp-chat>
tag to your HTML, let alone the configuration of the XMPP server.
Prerequisite
You'll need a DjangoLDP server with at least djangoldp-account
and a Prosody server with custom-modules
.
How to use
You can use the solid-xmpp-chat
component:
<html>
<head>
<!-- import the module in the head of the page -->
<script type="module" src="https://cdn.jsdelivr.net/npm/@startinblox/component-chat/"></script>
</head>
<body>
<!-- use the component -->
<solid-xmpp-chat data-src="[url]"
data-websocket-url="[your_prosody_url]">
</solid-xmpp-chat>
</body>
</html>
Notes that the "[url]" should be replace by your code fragment api link. It could be an user or any resource with a foaf:jabberID
.
Parameters
| Name | Default | Description |
| --------------- | ---------------------- | :----------------------------------------------------------- |
| data-src
| undefined
| URL of any resource with a foaf:jabberID
|
| data-websocket-url
| wss://jabber.happy-dev.fr/xmpp-websocket
| Websocket URL of your Prosody with custom-modules. |
Developpers
Installation:
npm install
Build with:
npm run build
Watch files & rebuild on change with this command:
npm run watch
Well done !