Add support for private message #1 #70

Merged
thrrgilag merged 6 commits from pnut_pm into main 2021-03-20 13:26:34 +00:00
Showing only changes of commit d1cc3f5949 - Show all commits

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