Skip to content

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
dblugeon commented Jun 8, 2013

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
titanous commented Jun 8, 2013

@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 Jul 15, 2013
Closed

Profile request #8

@jeena
jeena commented Jul 15, 2013

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 Sep 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.