Installation does not model situations where multiple Incoming Webhooks are created in a single workspace/organization

Aberta
#1,122 6 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
25/100
Tipo de issue
Funcionalidade
Clareza
Precisa de esclarecimento
Status de atividade
Estagnada
Stack de tecnologia
typescript

Direção de pesquisa

Comece rastreando o objeto Installation, InstallationStore e o ponto de entrada fetchInstallation() por meio de suas implementações. Compare como várias instalações são armazenadas e recuperadas em um workspace e, em seguida, determine uma interface consistente que preserve cada Incoming Webhook; estará concluído quando o design escolhido estiver especificado e suas implementações afetadas tiverem sido atualizadas sem perder dados de webhook.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

auto-triage-skip discussion pkg:oauth
Description

Currently the Installation object contains a single incomingWebhook property, as an object with several properties. That works when an OAuth flow completes and the installation needs to be stored since a single installation can generate at most one Incoming Webhook. However, when another installation in the same workspace or organization occurs, it will create a new Incoming Webhook. This might also be fine if you're happy with the InstallationStore storing a new record for this installation, even though most of the data in it is duplicative. However when fetching that installation, the InstallationStore returns a single Installation object, which can only contain one Incoming Webhook. That means one of the two Incoming Webhooks is not reachable.

One possible solution is to update the interface for Installation so that the incomingWebhook property becomes incomingWebhooks, which contains an array of the created webhooks instead of just one. However we'd have to figure out how InstallationStores are meant to merge the individual installations into one. This might require a redesign of that interface, and updated implementations.

Another solution is to update the return value of fetchInstallation() to be an array of Installation objects. This would be simpler to implement, but would encourage storing duplicative data .

There may be other good solutions available. Let's brainstorm and discuss.

Requirements (place an x in each of the [ ])
  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.
Linguagem predominante
TypeScript
Estrelas
3.4k
Forks
694
Merge médio
1d 10h
PRs com merge (30d)
75

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de slackapi/node-slack-sdk

Todas as issues de slackapi/node-slack-sdk

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.