
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
chat-engine-open-graph
Advanced tools
Identify if **message.data.text** contains an URL, send it to your server or a third party service and get the data collected into **message.data.metadata** which you can use in order to transform a plain message in a thumbnail.
Identify if message.data.text contains an URL, send it to your server or a third party service and get the data collected into message.data.metadata which you can use in order to transform a plain message in a thumbnail.
npm install chat-engine-open-graph
const ChatEngine = ChatEngineCore.create({
publishKey: 'pub-key-here',
subscribeKey: 'sub-key-here'
});
ChatEngine.connect('Username');
ChatEngine.on('$ready', () = { ... });
const apiKey = "xxxxxxxxxxxxxxx";
You have to inject a function to the attribute api which receive as a parameter the URL detected inside of message and arrange it into a query parameter to the API endpoint of the server side.
ChatEngine.global.plugin(ChatEngineCore.plugin['chat-engine-open-graph']({
api: (url) => `https://opengraph.io/api/1.1/site/${encodeURI(url)}?app_id=${apiKey}`
}));
or
const opengraph = require('chat-engine-open-graph');
ChatEngine.global.plugin(opengraph({ api: (url) => `https://opengraph.io/api/1.1/site/${encodeURI(url)}?app_id=${apiKey}` }));
FAQs
Identify if **message.data.text** contains an URL, send it to your server or a third party service and get the data collected into **message.data.metadata** which you can use in order to transform a plain message in a thumbnail.
We found that chat-engine-open-graph demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.