Commit Graph

16 Commits (b1daa71da5f9579fb064be444e73337162926c26)

Author SHA1 Message Date
Eugen Rochko 35b84985a8
Skip ActivityPub Announces of non-public objects ()
* Skip ActivityPub Announces of non-public objects

* Skip OStatus reblogs of non-public statuses
2018-01-09 19:35:10 +01:00
abcang 3caec1ecc2 Save media outside transaction () 2017-12-10 16:33:52 +01:00
Yamagishi Kazutoshi b21db9bbde Using double splat operator () 2017-12-06 11:41:57 +01:00
Eugen Rochko 484208ce12 When status is fetched instead of delivered, do not stream it () 2017-10-17 20:05:21 +02:00
Eugen Rochko 0717d9b3e6 Set snowflake IDs for backdated statuses ()
- Rename Mastodon::TimestampIds into Mastodon::Snowflake for clarity
- Skip for statuses coming from inbox, aka delivered in real-time
- Skip for statuses that claim to be from the future
2017-10-08 17:34:34 +02:00
Akihiko Odaki 63f0979799 Validate id of ActivityPub representations ()
Additionally, ActivityPub::FetchRemoteStatusService no longer parses
activities.
OStatus::Activity::Creation no longer delegates to ActivityPub because
the provided ActivityPub representations are not signed while OStatus
representations are.
2017-10-04 01:13:48 +02:00
ThibG 34fa305a00 Fix race condition when processing incoming OStatus messages ()
* Avoid races in incoming OStatus toots processing

* oops

* oops again
2017-09-19 21:44:18 +02:00
Akihiko Odaki bb4d005a83 Introduce OStatus::TagManager () 2017-09-19 18:08:08 +02:00
Eugen Rochko 81cec35dbf Custom emoji ()
* Custom emoji

- In OStatus: `<link rel="emoji" name="coolcat" href="http://..." />`
- In ActivityPub: `{ type: "Emoji", name: ":coolcat:", href: "http://..." }`
- In REST API: Status object includes `emojis` array (`shortcode`, `url`)
- Domain blocks with reject media stop emojis
- Emoji file up to 50KB
- Web UI handles custom emojis
- Static pages render custom emojis as `<img />` tags

Side effects:

- Undo  optimization, as I needed to modify it to restore
  shortcode handling in emojify()
- Formatter#plaintext should now make sure stripped out line-breaks
  and paragraphs are replaced with newlines

* Fix emoji at the start not being converted
2017-09-19 02:42:40 +02:00
unarist 504737e860 Convert OStatus tag to ActivityPub id on in_reply_to resolution () 2017-09-01 13:34:04 +02:00
unarist af2d22f88c Fallback from perform_via_activitypub on private posts ()
Currently, private / direct posts via OStatus from AP compatible instance will be dropped due to failing to fetch AP version.

So this fallbacks to OStatus handling:

* when failed to fetch ActivityPub version
* when status is neither :public nor :unlisted
2017-09-01 12:33:02 +02:00
Eugen Rochko 4c76402ba1 Serialize ActivityPub alternate link into OStatus deletes, handle it ()
Requires moving Atom rendering from DistributionWorker (where
`stream_entry.status` is already nil) to inline (where
`stream_entry.status.destroyed?` is true) and distributing that.

Unfortunately, such XML renderings can no longer be easily chained
together into one payload of n items.
2017-08-29 16:11:05 +02:00
Eugen Rochko 40c45f5dd9 Put ActivityPub alternate link into Atom, prefer it when processing Atom () 2017-08-18 01:03:18 +02:00
Eugen Rochko 4fcbb1f838 Re-add missing transaction around status-from-OStatus creation () 2017-08-14 21:37:21 +02:00
Eugen Rochko a5a07da892 Correct OStatus inflection (Ostatus -> OStatus) () 2017-07-19 01:37:26 +02:00
Akihiko Odaki 89b988cab5 Introduce Ostatus name space ()
* Wrap methods of ProcessFeedService::ProcessEntry in classes

This is a change same with 425acecfdb, except
that it has the following changes:

* Revert irrelevant change in find_or_create_conversation
* Fix error handling for RemoteActivity

* Introduce Ostatus name space
2017-07-18 16:39:47 +02:00