Photo albums make extensive use of the "publicly-appendable collections" FEP.

Albums themselves are sm:PhotoAlbum objects, which are a subtype of Collection. Each album contains sm:Photo objects representing photos. Albums belonging to an actor reside in its sm:photoAlbums collection.

Album object

sm:PhotoAlbum objects have the following fields:

  • id and url
  • name – the title
  • summary – the description
  • totalItems – the number of photos
  • attributedTo – the owner ID
  • published and updated – timestamps when this album was created and when the newest photo was added, respectively
  • first – the first CollectionPage containing sm:Photos
  • sm:displayOrder – the number that determines in which order to display the albums, sort by these in ascending order
  • preview – the ID of the photo that's being used as this album's cover
  • sm:comments – the ID of the collection containing all the comments on all the photos in this album
  • sm:systemType – for system albums, either sm:SavedPhotos or sm:ProfilePictures
  • sm:viewPrivacy and sm:commentPrivacy – user-owned albums only, privacy setting objects for who can see this album and who can comment on the photos it contains
  • sm:uploadsRestricted – group-owned albums only, whether only group managers can upload new photos to this album
  • sm:commentingDisabled – group-owned albums only, true if commenting on the photos in this album is not allowed

Photo object

sm:Photo objects have the following fields:

  • id and url
  • attributedTo – for user-owned photos, matches the owner; for group-owned photos, specifies the user who uploaded this photo
  • target – the abbreviated collection object (as per FEP-400e) for the photo album
  • summary – the description
  • published – the timestamp when this photo was uploaded
  • sm:displayOrder – an integer to sort photos within the album by, similar to the same field in album objects
  • replies – the collection of comments on this photo
  • likes – the collection of likes of this photo
  • image – the Image representing the photo
  • tag – contains sm:TaggedPerson objects representing tags, if any, see below

Creating, updating, or deleting and album is done by the owner sending a Create{sm:PhotoAlbum}, Update{sm:PhotoAlbum}, or Delete{sm:PhotoAlbum} activity, respectively, to its followers, or the subset of followers matching the album's "who can view" privacy setting, whichever is smaller. In case the album's "who can view" privacy setting changes such that fewer or different people can see the album now, the Update activity is sent to both the new and the old audiences, so that the servers of people who no longer have access to the album know to hide it from those users.

It is currently not possible to remotely create albums in groups, thus only group managers can create those (group managers are required to be on the same server as the group itself).

Photos work largely the same as wall posts, except the collection they belong to is the album instead of an actor's sm:wall.

  • Adding a photo works by the owner sending an Add{sm:Photo} activity.
    • The activity is sent to the owner's followers, or whoever can see the album, whichever set is smaller.
    • To add a photo to an album in a group, a user sends a Create{sm:Photo} activity to the group, which then Adds it to the album.
  • Updating a photo (its description, tags, or display order) is done by sending an Update{sm:Photo} activity.
    • For user-owned photos, it's the same as for creating a photo.
    • For group-owned photos, the activity is sent to the group, which then forwards it to its followers. It's strongly recommended to LD-sign your activity to make this work.
  • Deleting a photo:
    • If the photo is being deleted by its original uploader, it works the same as updating, but with a Delete{sm:Photo} activity.
    • If the photo is in a group and is being deleted by a group manager, a Remove{sm:Photo} is sent to the followers and the uploader.

Comments

See comment federation.

Each album has its own sm:comments collection that contains all comments on all photos.

Tagging

Tags on photos can only be added by the uploader, and, in case of groups, group managers.

A user can only tag themselves or their friends in a photo, and only those that can see the album it's in.

A tag can reference a user actor, or it can just be some freeform label. If it does reference a user, the tag must first be confirmed by that user, unless the user tagged themselves. Unconfirmed tags display the name, but don't link to the profile.

All photos a user is tagged in are available in the sm:taggedPhotos collection, subject to the corresponding privacy setting.

  • Adding or removing a tag is done by simply sending an Update{sm:Photo} with the new tag added to or removed from the tag field.
  • Confirming a tag is done by Adding the photo to the sm:taggedPhotos collection.
    • Whether the tag is confirmed can be checked using a collection query.
    • After a tag is confirmed, the photo owner sends an Update{sm:Photo}.
    • These Add activities are also sent to followers, so their servers could create a "%username% was tagged in a photo" newsfeed entry and have an up-to-date list of tagged photos.
  • Rejecting a tag is done by sending a Reject{sm:Photo} to the owner, with sm:taggedPhotos as the target.
  • Removing a previously confirmed tag is done by sending a Remove{sm:Photo} with target set to, again, sm:taggedPhotos.

sm:TaggedPerson (subtype of ActivityPub Link) objects have the following fields:

  • id
  • name – the name as entered by whoever created the tag, or the name of the tagged user
  • published – the timestamp when the tag was created
  • sm:rect – an array of 4 floats determining the tagged area, in the order [left, top, right, bottom], each from 0 to 1, where 0 is the top left corner and 1 is bottom right
  • sm:approved – whether the tag was approved by the tagged person. This value can be trusted for users on the same server as the photo, but it's highly recommended to make collection queries to re-check the approval state for tags for users on other servers
  • attributedTo – the ID of the user who created the tag
  • href – if it's a tagged user and the tag was approved by them, the ID of that user

Limits

Smithereen imposes the following limits:

  • No more than 70 albums per owner (excluding system albums).
  • No more then 5000 photos per album.
  • No more than 50 tags per photo.