def get_responders_with_oncall( self, ) -> List[ SlackResponder]: # TODO - use interface instead of SlackResponder """ Returns a list that is a combination of responders and oncall. An oncall is treated a responder """ responders: List[SlackResponder] = RespondersList.list(self.team_id) oncall = DynamoUtils.get_oncall(self.team_id) oncall_responder: SlackResponder = SlackResponder(oncall) if oncall_responder.id is not None and not any( responder.id == oncall_responder.id for responder in responders): responders.append(oncall_responder) return responders
def get_oncall(self, team_id): """Gets current oncall""" return DynamoUtils.get_oncall(team_id)