"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.audiencify = exports.getAudience = exports.buildAudience = void 0;
const constants_1 = require("../../initializers/constants");
function getAudience(actorSender, isPublic = true) {
    return buildAudience([actorSender.followersUrl], isPublic);
}
exports.getAudience = getAudience;
function buildAudience(followerUrls, isPublic = true) {
    let to = [];
    let cc = [];
    if (isPublic) {
        to = [constants_1.ACTIVITY_PUB.PUBLIC];
        cc = followerUrls;
    }
    else {
        to = [];
        cc = [];
    }
    return { to, cc };
}
exports.buildAudience = buildAudience;
function audiencify(object, audience) {
    return Object.assign(Object.assign({}, audience), object);
}
exports.audiencify = audiencify;
//# sourceMappingURL=audience.js.map