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 1d7aa671ea - Show all commits

View file

@ -150,6 +150,7 @@ def new_message(event, user):
prefix = ""
else:
token = app.config['MATRIX_PNUT_TOKEN']
matrix_profile = get_profile(event['user_id'])
if "displayname" in matrix_profile:
prefix = "[" + matrix_profile['displayname'] + "] (" + event['user_id'] + ")\n"
else:
@ -626,6 +627,7 @@ def on_direct_message(event, user, room):
prefix = ""
else:
token = app.config['MATRIX_PNUT_TOKEN']
matrix_profile = get_profile(event['user_id'])
if "displayname" in matrix_profile:
prefix = "[" + matrix_profile['displayname'] + "] (" + event['user_id'] + ")\n"
else: