🚑 Fix crash when sending non-message events

This commit is contained in:
2023-06-24 17:15:29 +02:00
parent cc944871a4
commit 1f2c27fa7e

View File

@ -154,6 +154,8 @@ client.on("Room.timeline", async function (event, room) {
!(await db.getObjectDefault(`/authStatus/${room.roomId}`, false)) &&
authPassword
) {
if (event.getType() !== "m.room.message") return;
if (!event.event.content.body.startsWith("login")) {
const response =
"🔐 Not authenticated! Use <code>login [password]</code> to login";