Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
matrix-appservice
Advanced tools
This is a Matrix Application Service framework written in Node.js.
This can be used to quickly setup performant application services for almost anything you can think of in a web framework agnostic way.
To create an app service registration file:
var AppServiceRegistration = require("matrix-appservice").AppServiceRegistration;
// creating registration files
var reg = new AppServiceRegistration();
reg.setAppServiceUrl("http://localhost:8010");
reg.setHomeserverToken(AppServiceRegistration.generateToken());
reg.setAppServiceToken(AppServiceRegistration.generateToken());
reg.setSenderLocalpart("example-appservice");
reg.addRegexPattern("users", "@.*", true);
reg.outputAsYaml("registration.yaml");
You only need to generate a registration once, provided the registration info does not change. Once you have generated a registration, you can run the app service like so:
var AppService = require("matrix-appservice").AppService;
// listening
var as = new AppService({
homeserverToken: "abcd653bac492087d3c87"
});
as.on("type:m.room.message", function(event) {
// handle the incoming message
});
as.onUserQuery = function(userId, callback) {
// handle the incoming user query then respond
console.log("RECV %s", userId);
callback();
};
// can also do this as a promise
as.onAliasQuery = function(alias) {
// Needs a promise lib e.g. var q = require("q");
var defer = q.defer();
// do stuff
defer.resolve();
return defer.promise;
};
as.listen(8010);
A hosted API reference can be found on GitHub Pages.
FAQs
Matrix Application Service Framework
The npm package matrix-appservice receives a total of 778 weekly downloads. As such, matrix-appservice popularity was classified as not popular.
We found that matrix-appservice demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.