Notable changes
Nostr, Bluesky `get_activities`, lots of improvements in `as2` and `microformats2`, and more!
_REST API breaking changes:_
[Twitter is dead](https://snarfed.org/2023-04-03_so-long-twitter-api-and-thanks-for-all-the-fish), at least in the REST API.
_Non-breaking changes:_
* Add new `nostr` module!
* `as1`:
* Add `get_owner`, `targets`.
* Add `accept`, `reject`, `stop-following` to `VERBS_WITH_OBJECT` and remove `repost`, [it's not an AS1 verb](https://activitystrea.ms/specs/json/schema/activity-schema.html#verbs).
* Handle `url` field list values (even though it's invalid AS1).
* `as2`:
* `to_as1`:
* Improve `Video` handling: support `Link` objects in `url`, extract stream URLs and types from link `tag`s.
* Coerce non-float `latitude` and `longitude` to float, raise `ValueError` on failure.
* Put image attachments into `image` as well as `attachments` ([bridgy-fed429](https://github.com/snarfed/bridgy-fed/issues/429)).
* Handle Hubzilla's composite object attachment `value`s.
* Bug fix for null `mediaType` in `attachment` and `tags`.
* Add new `TYPES_WITH_OBJECT` constant.
* Add new `get_urls`, `address` functions.
* Improve `Content-Type` compatibility with `application/ld+json; profile="https://www.w3.org/ns/activitystreams"`.
* Bug fix for `Undo` activities with bare string id `object`s.
* Revise HTML in `PropertyValue` attachments on actors to include full URL in anchro text to be compatible with Mastodon's profile link verification.
* `atom`:
* `activities_to_atom` etc:
* Switch `content` from XHTML to HTML inside CDATA to support non-XHTML input content ([bridgy-fed624](https://github.com/snarfed/bridgy-fed/issues/624).
* Bug fix, handle bare string URL `image` values.
* Bug fix, emove incorrect `type="application/atom+xml"` from `rel="self"` `link` in `entry`.
* Render `objectType: comment` attachments.
* Remove invalid `<a>` element for tags.
* Bug fixes in `activity_to_atom`/`activities_to_atom` for dict-valued `url` fields.
* Render images in article/note attachments.
* Render `objectType: service` attachments, eg Bluesky custom feeds.
* `bluesky`:
* Implement `Bluesky` API class, including `get_activities`.
* Drop bundled `app.bsky`/`com.atproto` lexicons, use lexrpc's instead.
* Convert reposts, quotes, inline links, attached links, and mentions, both directions. Includes Bluesky facet (rich text) support.
* Handle quote posts with attached images, both directions.
* Handle likes, both directions.
* Add new `web_url_to_at_uri` function.
* `from_as1`: handle link tags without start/end indices.
* `to_as1`:
* Add new `type` kwarg.
* Generate staging.bsky.app profile and post URLs.
* Propagate profile `did` into actor `id`.
* Add unimplemented stub for custom feeds, eg `app.bsky.feed.defsgeneratorView`.
* Add `as1_to_profile`.
* Bug fix for converting follows, both directions: `subject` in `app.bsky.graph.follow` is followee, not follower. ([That field is badly named!](https://discord.com/channels/1097580399187738645/1097580399187738648/1151933384738746478))
* `jsonfeed`:
* `activities_to_jsonfeed`:
* Bug fix, handle bare string values for `image` and `stream`.
* Bug fix: handle non-object `author`.
* `mastodon`:
* `status_to_object`: add/fix alt text handling for images.
* `microformats2`:
* `json_to_html`:
* HTML-escape tag and quote attachment names. Fixes [GHSA-4w4f-g49g-3f7j](https://github.com/snarfed/bridgy/security/advisories/GHSA-4w4f-g49g-3f7j); thank you [janboddez](https://github.com/janboddez)!
* `json_to_object`:
* Improve handling of items with multiple types by using [post type discovery](https://indiewebcamp.com/post-type-discovery) more aggressively.
* Normalize ISO-8601 format of `published` and `updated` timestamps.
* `object_to_json`:
* Bug fix, handle bare string URL `image` values.
* Normalize ISO-8601 format of `published` and `updated` timestamps.
* Handle bare string ids for `replies ` and `shares` (usually from AS2.)
* Include `objectType: service` attachments, eg Bluesky custom feeds, in JSON and HTML output.
* `rss`:
* `from_activities`: handle bare string id `author`.