# fyi.opensocial.membership

Grants a member their roles, in the members space. Written by the group authority; the record key is the member's DID. Writes are bounded by the writer's assignable roles. Creating one admits one waiting to join and decides their request; deleting one ejects the member.

A record the reference host at opensocial.fyi publishes. The page: https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-membership/

- Published at: at://did:plc:2gqnilpksz2e7faj3bwvo6qc/com.atproto.lexicon.schema/fyi.opensocial.membership
- In the spec: https://www.atmospheregroups.org/spec/lexicons/org-atgrp-membership/, which differs

## The schema as published

```json
{
  "defs": {
    "main": {
      "description": "Grants a member their roles, in the members space. Written by the group authority; the record key is the member's DID. Writes are bounded by the writer's assignable roles. Creating one admits one waiting to join and decides their request; deleting one ejects the member.",
      "key": "any",
      "record": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "member": {
            "format": "did",
            "type": "string"
          },
          "roles": {
            "description": "Distinct roles declared by this group.",
            "items": {
              "ref": "fyi.opensocial.defs#roleId",
              "type": "ref"
            },
            "maxLength": 100,
            "type": "array"
          }
        },
        "required": [
          "member",
          "roles",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "fyi.opensocial.membership",
  "lexicon": 1
}
```
