parent
55eb6177fe
commit
83c409481d
1 changed files with 7 additions and 3 deletions
|
@ -251,10 +251,14 @@ def delete_message(event, user):
|
||||||
logger.debug("- can't find the event to remove -")
|
logger.debug("- can't find the event to remove -")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
try:
|
||||||
r, meta = pnutpy.api.delete_message(e.pnut_chan_id, e.pnut_msg_id)
|
r, meta = pnutpy.api.delete_message(e.pnut_chan_id, e.pnut_msg_id)
|
||||||
e.deleted = True
|
e.deleted = True
|
||||||
db_session.commit()
|
db_session.commit()
|
||||||
|
|
||||||
|
except pnutpy.errors.PnutPermissionDenied as e:
|
||||||
|
pass
|
||||||
|
|
||||||
def get_displayname(userid):
|
def get_displayname(userid):
|
||||||
url = "http://localhost:8008/_matrix/client/r0/profile/" + userid
|
url = "http://localhost:8008/_matrix/client/r0/profile/" + userid
|
||||||
r = requests.get(url)
|
r = requests.get(url)
|
||||||
|
|
Loading…
Reference in a new issue