fetch the users profile
This commit is contained in:
parent
319ff22865
commit
1d7aa671ea
1 changed files with 2 additions and 0 deletions
|
@ -150,6 +150,7 @@ def new_message(event, user):
|
||||||
prefix = ""
|
prefix = ""
|
||||||
else:
|
else:
|
||||||
token = app.config['MATRIX_PNUT_TOKEN']
|
token = app.config['MATRIX_PNUT_TOKEN']
|
||||||
|
matrix_profile = get_profile(event['user_id'])
|
||||||
if "displayname" in matrix_profile:
|
if "displayname" in matrix_profile:
|
||||||
prefix = "[" + matrix_profile['displayname'] + "] (" + event['user_id'] + ")\n"
|
prefix = "[" + matrix_profile['displayname'] + "] (" + event['user_id'] + ")\n"
|
||||||
else:
|
else:
|
||||||
|
@ -626,6 +627,7 @@ def on_direct_message(event, user, room):
|
||||||
prefix = ""
|
prefix = ""
|
||||||
else:
|
else:
|
||||||
token = app.config['MATRIX_PNUT_TOKEN']
|
token = app.config['MATRIX_PNUT_TOKEN']
|
||||||
|
matrix_profile = get_profile(event['user_id'])
|
||||||
if "displayname" in matrix_profile:
|
if "displayname" in matrix_profile:
|
||||||
prefix = "[" + matrix_profile['displayname'] + "] (" + event['user_id'] + ")\n"
|
prefix = "[" + matrix_profile['displayname'] + "] (" + event['user_id'] + ")\n"
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue