Non-square profile pictures

Smithereen uses non-square profile pictures on the profile page. In order to retain compatibility with everything else, icon in the actor still points to a square picture. It's extended with the image field that contains the full rectangular one, and sm:cropRegion with the coordinates of the square version within the rectangular one. The coordinates are in the order [x1, y1, x2, y2], where (x1, y1) are the top-left corner of the square, and (x2, y2) are the bottom-right. The top-left corner of the rectangle is (0, 0), and the bottom-right one is (1, 1).

Example:

...
  "icon": {
    "type": "Image",
    "url": "http://smithereen.local:8080/s/uploads/avatars/a502dd6ba23da7a899526368b9b58896_xl.jpg",
    "width": 400,
    "height": 400,
    "image": {
      "type": "Image",
      "url": "http://smithereen.local:8080/s/uploads/avatars/a502dd6ba23da7a899526368b9b58896_rxl.jpg",
      "width": 400,
      "height": 565
    },
    "cropRegion": [
      0.0555555559694767,
      0.05295007675886154,
      0.745726466178894,
      0.5416036248207092
    ]
  },
...

Add and Remove activities for collections

For sm:friends and sm:groups collections for users, as well as sm:members and sm:tentativeMembers for groups and events, their owning actors send Add and Remove activities to their followers to help keep these lists in sync across servers. Smithereen also uses these activities to display entries like "John Smith added Jane Doe as a friend" in the news feed.

Privacy settings

Smithereen allows users to specify privacy settings. These come in two types: interactions and visibility. The interaction settings restrict who can perform actions with this user's account and the content they created, e.g. commenting on posts or sending direct messages. The visibility settings specify who can see certain types of content.

Privacy settings are specified in the sm:privacySettings field in the user actor object. The following keys are currently defined:

  • sm:wallPosting: who can create posts on this user's wall.
  • sm:wallPostVisibility: who can see others" posts on this user's wall. If no one on your server can see the posts of this user, the sm:wall collection will only contain this user's own posts.
  • sm:commenting: who can comment on this user's posts, both their own and posts made by others on their wall.
  • sm:groupInvitations: who can invite this user to join groups and events (the Invite{Group} activity).
  • sm:directMessages: who can send this user direct messages, i.e. Notes that are addressed neither to as:Public nor to anyone's followers or friends collections.

Each key corresponds to a privacy settings object. The format of this object is:

  • sm:allowedTo: an array of actor or collection IDs to whom access is allowed. If it is allowed to everyone, this contains as:Public as a single element. If it is not allowed to anyone, this is an empty array or null.
    • Supported collections are: followers, following, and sm:friends.
    • If the access is allowed to friends and their friends (i.e. friends themselves + anyone who has mutual friends with this user), the array would contain 2 elements: the ID of the sm:friends collection and a special value sm:FriendsOfFriends.
  • sm:except: an array of actor IDs who, even if they match sm:allowedTo, are not allowed to perform the action or access the content.

The actor ID lists are filtered by the domain of the server that's receiving the actor object to protect that user's privacy. When the user actor is fetched by its URL, the domain of the requesting server is determined by the HTTP signature, so it is important to sign GET requests for actors at all times.

When a user updates their privacy settings, an Update{Person} is sent to all affected servers or all followers, whichever set is smaller.

The default value for all privacy settings is "everyone":

{
  "sm:allowedTo": ["as:Public"],
  "sm:except": []
}

If a server still sends an activity that is not allowed by the user's privacy settings, Smithereen would respond with a 403 HTTP error.

Special exception for direct messages

If a user sends a message to someone who can't send them messages, the recipient is temporarily allowed to send them messages. The exception lasts for a week (168 hours) or 10 messages, whichever comes first. Every outgoing message resets the time and the message count.

User profile fields

Additional profile fields are mostly just custom keys in Person actors. Just like many other things in this project, they are mostly copied from VKontakte. Unless otherwise noted, the values are free-form plain (non-HTML) strings.

Structured name

  • firstName, alias to sc:givenName
  • lastName, alias to sc:familyName
  • middleName, alias to sc:additionalName
  • sm:maidenName

Gender

sc:gender, not displayed anywhere but is used to select pronouns and inflect names, possible values:

  • sc:Male, he/him
  • sc:Female, she/her
  • sc:Other, they/them

"Main" unlabeled section below the name

  • vcard:bday — birth date, of the form YYYY-MM-DD
  • sm:hometown
  • sm:relationshipStatus, possible values:
    • sm:Single
    • sm:InRelationship
    • sm:Engaged
    • sm:Married
    • sm:InLove
    • sm:Complicated
    • sm:ActivelySearching
  • sm:relationshipPartner — user's partner, must be an ID of another Person actor. Only valid when sm:relationshipStatus is present and is other than sm:Single or sm:ActivelySearching. For the partner to show up in the UI, they also need to set this user as their partner, unless the relationship status is sm:InLove.

If the actor has any unrecognized PropertyValue fields, they are also displayed in this section.

"Contacts" section

  • vcard:Address — city/location. Pleroma and Misskey had this field before Smithereen.

Other fields (website, Matrix, ...) are Mastodon-compatible PropertyValues with hardcoded English names and HTML links to corresponding services.

"Personal"/"philosophy" section

  • sm:politicalViews, possible values:
    • sm:Apathetic
    • sm:Communist
    • sm:Socialist
    • sm:Moderate
    • sm:Liberal
    • sm:Conservative
    • sm:Monarchist
    • sm:Ultraconservative
    • sm:Libertarian
  • sm:religion
  • sm:personalPriority, possible values:
    • sm:FamilyAndChildren
    • sm:CareerAndMoney
    • sm:EntertainmentAndLeisure
    • sm:ScienceAndResearch
    • sm:ImprovingTheWorld
    • sm:PersonalDevelopment
    • sm:BeautyAndArt
    • sm:FameAndInfluence
  • sm:peoplePriority, possible values:
    • sm:IntellectAndCreativity
    • sm:KindnessAndHonesty
    • sm:HealthAndBeauty
    • sm:WealthAndPower
    • sm:CourageAndPersistence
    • sm:HumorAndLoveForLife
  • sm:smokingViews, possible values:
    • sm:VeryNegative
    • sm:Negative
    • sm:Tolerant
    • sm:Neutral
    • sm:Positive
  • sm:alcoholViews, the values are the same as for sm:smokingViews
  • sm:inspiredBy

"Interests" section

  • sm:activities
  • sm:interests
  • sm:favoriteMusic
  • sm:favoriteMovies
  • sm:favoriteTvShows
  • sm:favoriteBooks
  • sm:favoriteGames
  • sm:favoriteQuotes
  • summary — the standard ActivityPub "bio" field, this is an HTML string