Olá Equipe,
Enviei um PR para atualizar a integração do Zulip em discourse/discourse:
main ← vijayho1:zulip-update-terminology
opened 09:33AM - 10 Mar 26 UTC
## Zulip: Update terminology and add per-thread topic mapping
### Terminology… update
- Replaces all occurrences of `stream` and `subject` with `channel` and `topic` respectively in user-facing parts
of the Zulip integration, to match current Zulip terminology.
### Per-thread topic mapping
- Makes the `topic` field optional in channel settings.
- When a fixed topic is configured, it is used as before.
- When the topic field is left blank, the Discourse thread title is
automatically used as the Zulip topic, mapping each Discourse thread to its own Zulip topic.
### Optional parameter support in Channel model
- Updates `channel.rb` to support `required: false` on channel parameters,
skipping validation for optional parameters when left blank.
- Updates `edit-channel.gjs` frontend validation to allow saving a channel
when optional parameters are left blank.
## Motivation
Zulip has updated its terminology: `streams` are now called `channels` and `subjects` are now called `topics`. This PR updates the integration to reflect that.
The per-thread topic mapping was requested in this [comment](https://meta.discourse.org/t/discourse-chat-integration/66522/309).
This PR is part of the work tracked in: [#33769](https://github.com/zulip/zulip/issues/33769#issuecomment-4020150075)
## Testing
- Syntax verified via `ruby -c` on all changed files.
- Spec file updated to reflect new keys (`channel`, `topic`) and includes
tests for both fixed topic and thread-title fallback behavior,
with request body assertions to verify the correct topic is sent.
- Full test suite requires a Discourse development environment to run.
Isto faz parte do trabalho acompanhado no projeto Zulip:
opened 11:42AM - 03 Mar 25 UTC
help wanted
in progress
documentation (integrations)
### Update the Discourse integration:
1. Update the following terminology in all… the user-facing parts of the Discourse-Zulip integration:
1. Replace all occurrences of the term "subject" with "topic".
2. Replace all occurrences of the term "stream" with "channel".
2. Support mapping each Discourse thread to its own Zulip topic, in a reasonable way, as requested in [this comment here](https://meta.discourse.org/t/set-up-zulip-notifications-using-the-chat-integration-plugin/68501).
This requires submitting a PR to [discourse/discourse-chat-integration](https://github.com/discourse/discourse-chat-integration), written in Ruby.
Relevant files to update:
- [lib/discourse_chat_integration/provider/zulip/zulip_provider.rb](https://github.com/discourse/discourse-chat-integration/blob/main/lib/discourse_chat_integration/provider/zulip/zulip_provider.rb)
- [spec/lib/discourse_chat_integration/provider/zulip/zulip_provider_spec.rb](https://github.com/discourse/discourse-chat-integration/blob/main/spec/lib/discourse_chat_integration/provider/zulip/zulip_provider_spec.rb)
You would need access to a Discourse server so that you can test the integration.
For the integration's setup instructions, refer to the [integration doc](https://zulip.com/integrations/doc/discourse).
### Update the documentation:
Once the PR has been merged, the following documentation pages also need to be updated.
- Update the [Zulip integration doc](https://zulip.com/integrations/doc/discourse) to update the setup instructions following the merge, by editing [this file](https://github.com/zulip/zulip/tree/main/templates/zerver/integrations/discourse.md).
- Get Discourse to update [their documentation](https://meta.discourse.org/t/set-up-zulip-notifications-using-the-chat-integration-plugin/68501). Contributors do not have the permission to directly edit the doc, or submit PRs for updating the doc. One would need to compile the list of changes, and get a Discourse team member to update the doc.
- In addition to the above changes made to the codebase, the doc also needs to be updated to use a more recent screenshot example (like the one used in the [Zulip integration doc](https://zulip.com/integrations/doc/discourse)), and being linked to the Zulip integration doc for the setup instructions involving Zulip.
- Once the mapping of Discourse threads to Zulip topics has been added, the [Chat integration instructions](https://meta.discourse.org/t/discourse-chat-integration/66522) needs to be updated too. Especially, update the comparison table and lines like "(Note that at this time, only the Slack integration implements threads.)" once Zulip also supports this, since a Zulip topic is better suited for Discourse threads than Slack threads are.
#### References:
For more on integrations, refer to these docs - [Integrations Overview](https://zulip.com/api/integrations-overview), and [Non-webhook integrations](https://zulip.com/api/non-webhook-integrations).
The Discourse integration is a plugin integration with all the code being located in [discourse/discourse-chat-integration](https://github.com/discourse/discourse-chat-integration).
O PR inclui:
Atualização da terminologia: stream → channel, subject → topic para corresponder à terminologia atual do Zulip (o Zulip renomeou estes no Zulip Server 10.0)
Mapeamento de tópico por thread: quando o campo de tópico é deixado em branco, o título do tópico do Discourse é usado automaticamente como o tópico do Zulip, mapeando cada tópico do Discourse para seu próprio tópico do Zulip
Suporte a parâmetros opcionais em channel.rb e edit-channel.gjs
Arquivo de migração atualizado
Agradeceria uma revisão quando tiverem um tempo!
Obrigado!