|
|
@ -502,6 +502,11 @@ client.on("Room.timeline", function (event, room) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (event.getTs() < (Date.now() - 1000 * 60 * 60 * 8)) {
|
|
|
|
|
|
|
|
// Ignore old events (8 hrs), they're probably duplicates or something.
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (event.getContent().body.toLowerCase().startsWith("!sms")) {
|
|
|
|
if (event.getContent().body.toLowerCase().startsWith("!sms")) {
|
|
|
|
// capture command to start room for new number
|
|
|
|
// capture command to start room for new number
|
|
|
|
const matches = event.getContent().body.match(/([1-9]?[0-9]{10})/g);
|
|
|
|
const matches = event.getContent().body.match(/([1-9]?[0-9]{10})/g);
|
|
|
|