forked from gergely/calendar-social
Make it possible to accept follow requests
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user