mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: timestamp calculation
This commit is contained in:
@@ -73,9 +73,7 @@ inbox.like = async (req) => {
|
||||
inbox.announce = async (req) => {
|
||||
const { actor, object, published, to, cc } = req.body;
|
||||
let timestamp = new Date(published);
|
||||
if (timestamp.toString() === 'Invalid Date') {
|
||||
timestamp = Date.now();
|
||||
}
|
||||
timestamp = timestamp.toString() !== 'Invalid Date' ? timestamp.getTime() : Date.now();
|
||||
|
||||
const assertion = await activitypub.actors.assert(actor);
|
||||
if (!assertion) {
|
||||
|
||||
Reference in New Issue
Block a user