From eae1df053c67b7ed46b038b262e72b1cfd917263 Mon Sep 17 00:00:00 2001 From: lub Date: Thu, 2 Jan 2020 21:01:57 +0100 Subject: [PATCH] auto-join on invite --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index 907f36e..ea552fe 100644 --- a/index.js +++ b/index.js @@ -41,6 +41,9 @@ async function matrixEventHandler(request, context) { tmiClient.disconnect(); }); }); + } else if(event.content.membership === 'invite' && event.state_key === '@'+bridge.opts.registration.sender_localpart+':'+bridge.opts.domain) { + // auto-join on invite + bridge.getIntent().join(event.room_id); } };