A particular user's packages (watchcommits flag)

    This rule includes messages that relate to packages where the
    specified user has the watchcommits flag set.

def user_package_watch_filter(config, message, fasnick=None, *args, **kw):
    """ A particular user's packages (watchcommits flag)

    This rule includes messages that relate to packages where the
    specified user has the watchcommits flag set.
    """

    fasnick = kw.get('fasnick', fasnick)
    if fasnick:
        msg_packages = fmn.rules.utils.msg2packages(message, **config)
        if not msg_packages:
            # If the message has no packages associated with it, there's no
            # way that "one of them" is going to happen to belong to this user,
            # so let's not waste our time doing the somewhat expensive call out
            # to pkgdb on the next line to check.
            return False
        usr_packages = fmn.rules.utils.get_packages_of_user(
            config, fasnick, only_watchcommits)
        return usr_packages.intersection(msg_packages)

    return False