benbrown / shuttlecraft

a single user activitypub server - join the federation!
https://shuttlecraft.net
MIT License
267 stars 30 forks source link

Receiving a message without date causes NaN directory name #61

Closed ringtailsoftware closed 1 year ago

ringtailsoftware commented 1 year ago

(There is no way to publish a poll yet, but I hacked createNote() directly to get one sent)

On receiving a poll response (from Mastodon), the ActivityPub message doesn't contain a datestamp. I now have a directory .data/activitystream/NaN/NaN-NaN/

The message received was:

{
  "id": "https://botsin.space/users/microdon1#votes/65830",
  "type": "Note",
  "name": "a",
  "attributedTo": "https://botsin.space/users/microdon1",
  "inReplyTo": "https://labs.ringtailsoftware.co.uk/m/a14a8b6f68e4aff4ad831fbf767365a0",
  "to": "https://labs.ringtailsoftware.co.uk/u/testuser5"
}
ringtailsoftware commented 1 year ago

Resolved by https://github.com/benbrown/shuttlecraft/pull/60/commits/89cf80fb474b7e54f9eda317df49c4049b10a844 In polls PR, where it can tested. Voting on a poll causes us to receive above message with no "published" field.