Download Latest Version v8.1 source code.tar.gz (1.4 MB)
Email in envelope

Get an email when there's a new version of granary

Home / v8.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2025-01-02 4.8 kB
v8.0 source code.tar.gz 2025-01-02 1.4 MB
v8.0 source code.zip 2025-01-02 1.5 MB
Totals: 3 Items   2.9 MB 0

Breaking changes:

  • as2:
  • from_as1: In Link objects (including Tags and Mentions), convert url to href. Before this, we left it as url, which was incorrect AS2.

Non-breaking changes:

Standardize function and method names in all modules to to_as1, from_as, etc. Old method names are now deprecated but won't be removed until at least v9.0, if not later.

  • as1:
  • Add new is_dm, recipient_if_dm, get_id, and is_audience functions.
  • as2:
  • Add sensitive, indexable, and discoverable support.
  • Add new is_server_actor function (FEP-d556, discussion).
  • from_as1:
    • Always convert images to objects with type: Image, never to bare string URLs (bridgy-fed#/1000).
    • Bug fixes for converting links to facets when the link text is the link URL.
  • to_as1:
    • Handle other types of tags better, eg non-standard Hashtag and inner tag field for name.
    • Bug fix for videos, mimeType goes in outer object, not in stream.
    • Bug fix for to/cc with mixed dict and string elements.
  • link_tags: add class="mention" for Mention tags (bridgy-fed/#887).
  • atom:
  • atom_to_activity/ies: Get URL from link for activities as well as objects. (Thanks @imax9000!)
  • bluesky:
  • Translate Bluesky app.bsky.feed.post#langs to/from AS1 contentMap (which isn't officially part of AS1; we steal it from AS2).
  • Translate AS2 sensitive on posts to Bluesky graphic-media self label, and many Bluesky self labels back to sensitive with content warning(s) in summary.
  • Translate AS1/2 DMs to/from Bluesky chats.
  • Translate video embeds in posts.
  • create/previewCreate:
    • If inReplyTo isn't a Bluesky URL or AT URI, return CreationResult instead of raising ValueError.
  • from_as1:
    • Convert articles to external embeds with no post text.
    • Add new as_embed boolean kwarg to do the same thing for any object.
    • When truncating and adding a link to the original post, use id if url is not available (snarfed/bridgy-fed#1155).
    • If the input object has inReplyTo or object or target with no recognizable ATProto or Bluesky object, raise ValueError.
    • Omit images that aren't in blobs.
    • Bug fix for quote posts with text content that's longer than Bluesky's limit (snarfed/bridgy-fed#1197).
    • When a flag has multiple objects, use the first one that's an ATProto record.
    • Handle URLs more carefully, don't add link facets with invalid uris.
    • Populate blobs into external embed thumbs.
    • Parse image blobs and add aspectRatio to image record.
    • Bug fix: handle HTML links with title in content correctly.
    • Bug fix: handle attachments with no id or url.
  • to_as1:
    • Extract links from app.bsky.actor.profile#description and #summary into url/urls fields.
    • Bug fix: first URL (singular) goes in url, list of URLs goes in urls.
    • Bug fix: handle hashtags with regexp special characters.
    • Support string and bytes CIDs in blob refs as well as CID instances.
    • Link hashtags to bsky.app hashtag search pages (bridgy-fed#1634).
  • Bluesky.get_activities: skip unknown record types instead of raising ValueError.
  • microformats2:
  • object_to_json: Improve handling of items with multiple types by removing inReplyTo from likes, shares, etc ([snarfed/bridgy-fed#941](https://github.com/snarfed/bridgy-fed/issues/941)).
  • to_as1: don't crash on integer UNIX timestamps in published and updated.
  • rss:
  • Support image enclosures, both directions.
  • from_as1:
    • Bug fix: remove use of default author value '-' since RSS spec requires author values to include valid email addresses.
  • source:
  • Source.postprocess_object: add new first_link_to_attachment boolean kwarg to fetch and generate a preview attachment for the first link in the HTML content, if any.
Source: README.md, updated 2025-01-02