create ghost user if not exist

This commit is contained in:
Morgan McMillian 2021-03-06 12:33:09 -08:00
parent a16732c8c6
commit d1cc3f5949

View file

@ -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()