Display buttons for sending private messages if applicable for the current user

This commit is contained in:
2021-04-23 13:18:14 -05:00
parent 5978a7749d
commit 4d44af2fc0
3 changed files with 8 additions and 262 deletions

View File

@@ -62,6 +62,12 @@ class peopleBuffer(wallBuffer):
self.tab.post.Enable(True)
else:
self.tab.post.Enable(False)
# Check if we are allowed to contact people. this might be false for communitiy members.
if post.get("can_write_private_message") == True:
self.tab.new_chat.Enable(True)
else:
self.tab.new_chat.Enable(False)
print(post)
if ("last_seen" in post) == False: return
original_date = arrow.get(post["last_seen"]["time"])
now = arrow.now()