diff --git a/server/api/controller/user.js b/server/api/controller/user.js index 5a68e7ab..c5433978 100644 --- a/server/api/controller/user.js +++ b/server/api/controller/user.js @@ -122,7 +122,7 @@ const userController = { // send response to client res.json(event) - federation.sendEvent(event, user) + federation.sendEvent(event, req.user) // send notification (mastodon/email/confirmation) notifier.notifyEvent(event.id) diff --git a/server/api/models/event.js b/server/api/models/event.js index 5fc43242..accbf2b4 100644 --- a/server/api/models/event.js +++ b/server/api/models/event.js @@ -48,7 +48,7 @@ module.exports = (sequelize, DataTypes) => { published: this.createdAt, attributedTo: `${config.baseurl}/federation/u/${username}`, to: 'https://www.w3.org/ns/activitystreams#Public', - cc: [follower], + cc: follower ? follower: [], content: this.title } }