ssbc / private-group-spec

GNU Lesser General Public License v3.0
13 stars 2 forks source link

Group applications #10

Closed luandro closed 4 years ago

luandro commented 4 years ago

Apply to join :

var content = {
  type: 'group/apply-to-join',
  version: 'v1',
  groupId: '3YUat1ylIUVGaCjotAvof09DhyFxE8iGbF6QxLlCWWc=',
  root: '%THxjTGPuXvvxnbnAV7xVuVXdhDcmoNtDDN0j3UTxcd8=.sha256',
  text: 'Hi kaitiaki, I am Ash son of Auxia, can I join?',                                      // optional
  recps: [
    '@Io9Yu78kY4GFMX3lzXUllRkNTbj5E+604AkaO1xJJz8=.ed25519', // kaitiaki feedId
    '@P0kcetMokY4GFMX3lzXUllRkNTbj5E+604AkaO1888U=.ed25519', // kaitiaki 2 feedId
    '@YXkE3TikkY4GFMX3lzXUllRkNTbj5E+604AkaO1xbz8=.ed25519'  // application sender feedId
  ],

  tangles: {
    application                          : {
      root: '%THxjTGPuXvvxnbnAV7xVuVXdhDcmoNtDDN0j3UTxcd8=.sha256',
      previous: [
        '%Sp294oBk7OJxizvPOlm6Sqk3fFJA2EQFiyJ1MS/BZ9E=.sha256'
      ]
    }
  }
}

Application:

var content = {
  type: 'group/application',
  version: 'v1',
  addMember: {
    add: '%3YUat1ylIUVGaCjotAvof09DhyFxE8iGbF6QxLlCWWc='
  },
  root: '%THxjTGPuXvvxnbnAV7xVuVXdhDcmoNtDDN0j3UTxcd8=.sha256',
  text: 'Accepted Ash son of Axuia ',                                      // optional
  recps: [
    '@Io9Yu78kY4GFMX3lzXUllRkNTbj5E+604AkaO1xJJz8=.ed25519', // kaitiaki feedId
    '@P0kcetMokY4GFMX3lzXUllRkNTbj5E+604AkaO1888U=.ed25519', // kaitiaki 2 feedId
    '@YXkE3TikkY4GFMX3lzXUllRkNTbj5E+604AkaO1xbz8=.ed25519'  // application sender feedId  ],

  tangles: {
    application: {
      root: '%THxjTGPuXvvxnbnAV7xVuVXdhDcmoNtDDN0j3UTxcd8=.sha256',
      previous: [
        '%Sp294oBk7OJxizvPOlm6Sqk3fFJA2EQFiyJ1MS/BZ9E=.sha256'
      ]
    }
  }
}
cryptix commented 4 years ago

Help me understand this better. I see the need for asking to join but how is the here accept an ask different from adding someone to a group?

mixmix commented 4 years ago

Hey context for this is that in Ahau we have a need to allow people to ask to join a private group. For this we are going to have thin public profiles which basically have a name and contact details, and maybe what you should include when contacting the kaitiaki (admins).

I don't think this is tied to the private-group-spec, I think this is "sugar" on the side, and others are welcome to implement as a pattern. For now let's move this to ssb-tribes @luandro (not your fault, you followed the existing code patterns well).

luandro commented 4 years ago

Moved to ssb-tribes.