File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 3131from PyMatcha .models .like import Like
3232from PyMatcha .models .match import Match
3333from PyMatcha .models .message import Message
34+ from PyMatcha .models .notification import Notification
3435from PyMatcha .models .report import Report
3536from PyMatcha .models .tag import Tag
3637from PyMatcha .models .view import View
@@ -267,6 +268,12 @@ def get_likes_sent(self):
267268 def get_blocks (self ):
268269 return Block .get_multis (blocker_id = self .id )
269270
271+ def get_all_notifications (self ):
272+ return Notification .get_multis (user_id = self .id )
273+
274+ def get_unread_notifications (self ):
275+ return Notification .get_multis (user_id = self .id , is_seen = False )
276+
270277 def already_likes (self , liked_id : int ) -> bool :
271278 with self .db .cursor () as c :
272279 c .execute (
You can’t perform that action at this time.
0 commit comments