'For muting user via modmail.'

@require_oauth2_scope('modcontributors')
@noresponse(VUser(), VModhash(), message=VByName('id'))
@api_doc(api_section.moderation)
def POST_mute_message_author(self, message):

    if (not message):
        return
    subreddit = message.subreddit_slow
    if (not subreddit):
        abort(403, 'Not    modmail')
    user = message.author_slow
    if (not subreddit.can_mute(c.user, user)):
        abort(403)
    if (not c.user_is_admin):
        if (not subreddit.is_moderator_with_perms(c.user, 'access', 'mail')):
            abort(403, 'Invalid    mod    permissions')
        if subreddit.use_quotas:
            sr_ratelimit = SimpleRateLimit(name=('sr_muted_%s' % subreddit._id36), seconds=g.sr_quota_time, limit=g.sr_muted_quota)
            if (not sr_ratelimit.record_and_check()):
                abort(403, errors.SUBREDDIT_RATELIMIT)
    VNotInTimeout().run(action_name='muteuser', details_text='modmail', target=user, subreddit=subreddit)
    added = subreddit.add_muted(user)
    if added:
        MutedAccountsBySubreddit.mute(subreddit, user, c.user, message)
        permalink = message.make_permalink(force_domain=True)
        ModAction.create(subreddit, c.user, 'muteuser', target=user, description=permalink)
        subreddit.add_rel_note('muted', user, permalink)
