# Componente Discourse-jitsi não está funcionando

**URL:** https://meta.discourse.org/t/discourse-jitsi-component-not-working/290861
**Category:** Bug
**Tags:** jitsi-video
**Created:** [Janeiro 8, 2024, 1:03pm UTC](https://meta.discourse.org/t/discourse-jitsi-component-not-working/290861 "2024-01-08T13:03:08Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![ranjeet](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@ranjeet](https://meta.discourse.org/u/ranjeet)
#### Post date: [Janeiro 8, 2024, 1:03pm UTC](https://meta.discourse.org/t/discourse-jitsi-component-not-working/290861/1 "2024-01-08T13:03:08Z")

</div>

Eu instalei o [discourse-jitsi](https://meta.discourse.org/t/jitsi-video-conference/146046)  
mas nenhuma opção está disponível no editor para adicionar conferência jitsi

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [Janeiro 8, 2024, 1:46pm UTC](https://meta.discourse.org/t/discourse-jitsi-component-not-working/290861/3 "2024-01-08T13:46:43Z")

</div>

Há um erro:

> [THEME 81 ‘Discourse Jitsi’] Erro de compilação: SyntaxError: "Identificador ‘themePrefix’ já foi declarado em ‘/discourse/theme-81/discourse/components/modal/insert-jitsi.gjs’ (11:7)\n\n 9 | import DModal from "discourse/components/d-modal";\n 10 | import TextField from "discourse/components/text-field";\n\> 11 | import themePrefix from "discourse/helpers/theme-prefix";\n | ^\n 12 | import i18n from "discourse-common/helpers/i18n";\n 13 | export default class InsertJitsi extends Component {\n 14 | @tracked" (discourse/components/modal/insert-jitsi.gjs)\n

A função [`themePrefix`](https://github.com/discourse/discourse/blob/main/lib/theme_javascript_compiler.rb#L261) já está disponível em um contexto de componente, e o erro ocorre porque a importação tenta sobrescrevê-la. Isso está relacionado ao último [PR #20](https://github.com/discourse/discourse-jitsi/pull/20).

> <https://github.com/discourse/discourse-jitsi/blob/main/javascripts/discourse/components/modal/insert-jitsi.gjs#L8>

EDIT: fiz um PR 👍

> <https://github.com/discourse/discourse-jitsi/pull/21>
>
> Meta: https://meta.discourse.org/t/discourse-jitsi-component-not-working/290861
> …
> Followup https://github.com/discourse/discourse-jitsi/pull/20
> 
> This PR fixes two issues:
> \* \`Identifier ‘themePrefix’ has already been declared\`; \`themePrefix\` function already exists in a component context.
> \* The theme settings are not working because the site settings lookup overwrote them. There is also a logic issue with the \`show\_in\_options\_dropdown\` setting, where we want to show the button if \`only\_available\_to\_staff\` is not checked or the user is a staff only.
> 
> Tests would be welcomed, but I'm not good enough yet to make them correctly and fast.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [Janeiro 8, 2024, 3:04pm UTC](https://meta.discourse.org/t/discourse-jitsi-component-not-working/290861/5 "2024-01-08T15:04:24Z")

</div>

Como é um componente de tema #oficial (especialmente um com uma tag configurada 🙂), ter um tópico dedicado é :chefs_kiss:. Isso me poupa de ter que separar tópicos mais tarde. 🙂

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [Janeiro 8, 2024, 3:06pm UTC](https://meta.discourse.org/t/discourse-jitsi-component-not-working/290861/6 "2024-01-08T15:06:27Z")

</div>

Ah, ótimo! Bom saber!

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [Janeiro 8, 2024, 8:06pm UTC](https://meta.discourse.org/t/discourse-jitsi-component-not-working/290861/7 "2024-01-08T20:06:01Z")

</div>

Muito obrigado pelo conserto, @Arkshine, já foi mesclado.

---

<div class="post-metadata">

### Author: ![isaac](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/isaac/32/235758_2.png) [@isaac](https://meta.discourse.org/u/isaac)
#### Post date: [Janeiro 8, 2024, 8:18pm UTC](https://meta.discourse.org/t/discourse-jitsi-component-not-working/290861/8 "2024-01-08T20:18:57Z")

</div>

Obrigado @Arkshine, podemos encerrar?

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [Janeiro 10, 2024, 11:03pm UTC](https://meta.discourse.org/t/discourse-jitsi-component-not-working/290861/9 "2024-01-10T23:03:23Z")

</div>

Este tópico foi fechado automaticamente após 2 dias. Novas respostas não são mais permitidas.
