Make it possible to accept follow requests

This commit is contained in:
2018-07-12 09:56:55 +02:00
parent 61f10f951c
commit 5639c3f578
3 changed files with 59 additions and 0 deletions

View File

@@ -604,6 +604,12 @@ class UserFollow(db.Model): # pylint: disable=too-few-public-methods
#: The timestamp when the follow was accepted
accepted_at = db.Column(db.DateTime(), nullable=True)
def accept(self):
"""Accept this follow request
"""
self.accepted_at = datetime.utcnow()
class Notification(db.Model):
"""Database model for notifications