
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.
strophejs-plugin-rsm
Advanced tools
Plugin for strophe.js providing Result Set Management (RSM) XEP-0059.
npm install strophejs-plugin-rsm
import 'strophejs-plugin-rsm';
<script src="strophe.min.js"></script>
<script src="strophe.rsm.js"></script>
Make sure Strophe is installed and the plugin is imported into your app. With RSM is available to do paged stanza requests like so:
require('strophejs-plugin-rsm');
var connection = new Strophe.Connection('wss://...');
var options = {
before: '',
isGroup: false,
max: 50,
};
var messages = [];
var queryid = connection.getUniqueId();
var stanza = $iq({ type: 'set' }).c('query', { xmlns: Strophe.NS.MAM, queryid });
var node = new Strophe.RSM(options);
stanza.cnode(node.toXML());
connection.addHandler((message: any) => {
var fin = getElementByTagName(message, 'fin', Strophe.NS.MAM);
var result = getElementByTagName(message, 'result', Strophe.NS.MAM);
if (fin && queryid === fin.getAttribute('queryid')) {
var paging = new Strophe.RSM({ xml: fin });
// `paging` is now our paged RSM object with the following attributes:
// paging.next()
// paging.previous()
// paging.toXML()
// paging.fromXMLElement()
return false;
} else if (result && queryid === result.getAttribute('queryid')) {
messages.push(message);
}
return true;
}, Strophe.NS.MAM);
connection.sendIQ(stanza, null, null);
0.0.2 (2017-07-14)
FAQs
A strophe.js plugin for XEP-0059 Result Set Management
The npm package strophejs-plugin-rsm receives a total of 109 weekly downloads. As such, strophejs-plugin-rsm popularity was classified as not popular.
We found that strophejs-plugin-rsm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.