Skip to content

Loading…

Meta profile details #195

Closed
wants to merge 1 commit into from

4 participants

@titanous
Tent — the protocol for decentralized communication member

The basic profile has been completely removed, and most of the fields moved to the meta post. An optional parameter set when requesting a single post or list of post data allows apps to receive an object containing these profile fields for each entity that published an included post, as well as mentioned entities.

List Page

{
  "pages": {},
  "posts": ["..."],
  "refs": ["..."],
  "profiles": {
    "https://jonathan.tent.is": {
      "name": "Jonathan Rudenberg",
      "location": "The Internet",
      "avatar_digest": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae",
    }
  }
}

Single Post

{
  "post": {},
  "refs": ["..."],
  "profiles": {
    "https://jonathan.tent.is": {
      "name": "Jonathan Rudenberg",
      "location": "The Internet",
      "avatar_digest": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae",
    }
  }
}

See also tent/tent-schemas#7.

@dblugeon

A little question, how tent network should be handle private data profile ? In G+ network is possible to have profile data depending from permissions (individual and groups). In Tent, tent server must have a public version and many private version ?

@titanous
Tent — the protocol for decentralized communication member

@dblugeon This data is totally optional but public. Apps and entities are free to create profile posts of their own design with non-public permissions.

@seanmonstar

Exact details would be useful to finish up my use of meta post.

@dblugeon

The avatar digest is the representation in base64 of avatar image ? But how, the tent client knows the content-type of this image ?

@titanous
Tent — the protocol for decentralized communication member

@dblugeon No. The avatar_digest is the digest of an attachment that is the avatar image. The attachment endpoint can be used to retrieve attachments given an entity and digest. The Content-Type is set when creating the attachment, and returned by the server when downloading.

@dblugeon

it is not necessary to update the meta-type to include the avatar_digest field?

@titanous
Tent — the protocol for decentralized communication member

No, the server picks the digest from the first attachment to the meta post with a image/* Content-Type and category set to avatar.

@hendrikcech hendrikcech referenced this pull request in hendrikcech/tent-request
Closed

Profile request #8

@jeena

I'm adding it here so others can find it (got the info from Quentin Calvez):

The values are comma separated, and can be the following: "entity, refs, mentions, permissions, parents". Those specify which profiles you want to get in the profile array (the profile of the mentioned users, the profiles of the ref users, etc) (as JavaScript):

serverUrls["posts_feed"] + "?profiles=entity,refs,mentions,permissions,parents"

And to get the avatar url:

serverUrls["attachment"].replace(/\{entity\}/, encodeURIComponent(status.entity)).replace(/\{digest\}/, avatar_digest);

@titanous titanous closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 22, 2013
  1. @titanous
Showing with 3 additions and 8 deletions.
  1. +3 −8 content/docs/post-types.md
View
11 content/docs/post-types.md
@@ -27,6 +27,9 @@ All entities notified of this change must rewrite their posts with the updated
to the post `entity` as well as entities used in mentions, version parents,
groups and permissions.
+The post also includes some "profile" details. These details are optionally made
+available to apps when they request posts.
+
Modified meta posts are sent to all relationships and apps regardless of
subscriptions.
@@ -215,11 +218,3 @@ A favorite references another post.
The post may include a mention of the original post. The type fragment must be set to the type of the original post.
{post_favorite schema}
-
-### Basic Profile
-
-`https://tent.io/types/basic-profile/v0`
-
-The basic profile describes the entity that published it.
-
-{post_basic-profile schema}
Something went wrong with that request. Please try again.