 
     if who?
       who = robot.brain.userForName who
-      listOpenPullRequestsForRoom msg.message.room, who.name
+      who = who.name
+
+    listOpenPullRequestsForRoom msg.message.room, who
 
   robot.brain.once 'loaded', ->
     # Run a cron job that runs every minute, Monday-Friday

    repo = octo.repos(githubOrg, repo)
    repo.pulls.fetch(state: "open").then (prs) ->
      return Promise.all prs.map (pr) ->
        if not user? or pr.assignee?.login.toLowerCase() is user.toLowerCase()
          return repo.pulls(pr.number).fetch()
        return
    .then ( prs ) ->
      message = ""
      for pr in prs when pr
          message+= """
            *[#{pr.title}]* +#{pr.additions} -#{pr.deletions}
            #{pr.htmlUrl}
            Updated: *#{moment(pr.updatedAt).fromNow()}*
            Status: #{if pr.mergeable then "Mergeable" else "Unresolved Conflicts"}
            Author: #{lookupUserWithGithub pr.user}
            Assignee: #{lookupUserWithGithub pr.assignee}
            \n
          """
      if message.length is 0
        message = "No matching pull requests found"


        verbose: no
      results = f.search github.login
      result = if results? and results.length >=1 then results[0] else null
      return result if result
    return null

  notificationShouldFire = (notification) ->
    now = new Date
