Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
strophejs-plugin-mam
Advanced tools
A strophe.js plugin for Message Archive Management (XEP-0313)
Plugin for strophe.js to provide Message Archiving Management (XEP-0313).
This plugin requires the Strophe.RSM plugin to be loaded as well.
npm install strophejs-plugin-mam
connection.mam.query(where, parameters)
where
is the JID hosting the archive. In most cases you will want to
set this to your own bare JID in order query your personal archive, but
it could also be a MUC room, an archiving component or a bot.
parameters
is an object containing parameters for the query. This can
have properties from two and a half categories:
Handlers: onMessage
which gets called for each message received,
and onComplete
which is called when the query is completed.
Filtering: Half of this is the parameters defined by MAM; with
,
start
or end
, which allow you to filter the results on who the
conversation was with, and the time range.
Additionally, parameters from Result Set Management can be
supplied. You would probably be most interested in the after
and
before
properties, which allow you to do pagination of the result set,
and the max
property, which allow you to limit the number of items in
each page. Note: Better RSM integration is on the TODO, you currently
have to pick out the last
or first
items yourself and pass
those as after
or before
respectively.
To query, for example, your personal archive for conversations with
juliet@capulet.com
you could do:
connection.mam.query("you@example.com", {
"with": "juliet@capulet.com",
onMessage: function(message) {
console.log("Message from ", $(message).find("forwarded message").attr("from"),
": ", $(message).find("forwarded message body").text());
return true;
},
onComplete: function(response) {
console.log("Got all the messages");
}
});
[0.0.3] - 2017-07-14
FAQs
A strophe.js plugin for Message Archive Management (XEP-0313)
The npm package strophejs-plugin-mam receives a total of 85 weekly downloads. As such, strophejs-plugin-mam popularity was classified as not popular.
We found that strophejs-plugin-mam 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.