mx-puppet-bridge
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -253,2 +253,6 @@ "use strict"; | ||
log.info("Starting application service...."); | ||
process.on("unhandledRejection", (err, promise) => { | ||
log.error("Unhandled Promise Rejection:", err); | ||
log.error(promise); | ||
}); | ||
process.on("SIGINT", () => { | ||
@@ -255,0 +259,0 @@ this.AS.stop(); |
@@ -102,2 +102,9 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (yield this.bridge.namespaceHandler.isMessageBlocked(params)) { | ||
return; | ||
} | ||
const userIds = yield this.bridge.namespaceHandler.getRoomPuppetUserIds(params.room); | ||
if (userIds.has(params.user.userId)) { | ||
return; | ||
} | ||
log.info(`Got request to add userId=${params.user.userId} to roomId=${params.room.roomId}` + | ||
@@ -104,0 +111,0 @@ ` puppetId=${params.room.puppetId}`); |
{ | ||
"name": "mx-puppet-bridge", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Matrix Puppeting Bridge library", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -335,2 +335,7 @@ /* | ||
process.on("unhandledRejection", (err, promise) => { | ||
log.error("Unhandled Promise Rejection:", err); | ||
log.error(promise); | ||
}); | ||
process.on("SIGINT", () => { | ||
@@ -337,0 +342,0 @@ this.AS.stop(); |
@@ -108,2 +108,9 @@ /* | ||
public async addUser(params: IReceiveParams) { | ||
if (await this.bridge.namespaceHandler.isMessageBlocked(params)) { | ||
return; | ||
} | ||
const userIds = await this.bridge.namespaceHandler.getRoomPuppetUserIds(params.room); | ||
if (userIds.has(params.user.userId)) { | ||
return; | ||
} | ||
log.info(`Got request to add userId=${params.user.userId} to roomId=${params.room.roomId}` + | ||
@@ -110,0 +117,0 @@ ` puppetId=${params.room.puppetId}`); |
887833
22590