From d1cc3f5949cbf23e0924fdc3b2eb09533f9c1323 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Sat, 6 Mar 2021 12:33:09 -0800 Subject: [PATCH] create ghost user if not exist --- pnut-matrix.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pnut-matrix.py b/pnut-matrix.py index 0617b39..19eb9ce 100644 --- a/pnut-matrix.py +++ b/pnut-matrix.py @@ -47,6 +47,9 @@ def new_message(msg, meta): # subscribed_user_ids from meta logger.debug(meta['subscribed_user_ids']) pnut_user = matrix_id_from_pnut(msg.user.username) + profile = get_matrix_profile(pnut_user) + if not profile: + new_matrix_user(msg.user.username) invitees=[] for pm_user in meta['subscribed_user_ids']: user = Users.query.filter(Users.pnut_user_id == pm_user).one_or_none()