#NEWLINE# @ defer . inlineCallbacks #NEWLINE# def unread_notifs_for_room_id( self , room_id , sync_config ) : #NEWLINE# #INDENT# with Measure ( self . clock , 'unread_notifs_for_room_id' ) : #NEWLINE# #INDENT# last_unread_event_id = ( yield self . store . get_last_receipt_event_id_for_user ( user_id = sync_config . user . to_string ( ) , room_id = last_unread_event_id , receipt_type = 'm.read' ) ) #NEWLINE# notifs = [ ] #NEWLINE# if last_unread_event_id : #NEWLINE# #INDENT# notifs = ( yield self . store . get_unread_event_push_actions_by_room_for_user ( room_id , sync_config . user . to_string ( ) , last_unread_event_id ) ) #NEWLINE# defer . returnValue ( notifs ) #NEWLINE# #UNINDENT# defer . returnValue ( None )