uckelman
(Joel Uckelman)
3 Marzo, 2024 14:09
1
Veo esto en la página de edición de Webhooks con 3.3.0.beta1-dev:
Dos de las secciones y las etiquetas de sus casillas de verificación parecen mostrar claves i18n en lugar de los valores de esas claves. Por ejemplo, estoy bastante seguro de que
[en.admin.web_hooks.voting_event.group_name]
no es el encabezado previsto para la categoría que se supone que debe ser.
3 Me gusta
¡Buena observación!
No deberías ver el webhook de un plugin que no está instalado en tu Discourse.
Esta es una regresión de aquí:
committed 03:35AM - 09 Oct 23 UTC
Before this change, webhooks could be only configured for specific groups like f… or example, all topic events.
We would like to have more granular control like for example topic_created or topic_destroyed.
Test are failing because plugins changed has to be merged as well:
discourse/discourse-assign#498
discourse/discourse-solved#248
discourse/discourse-topic-voting#159
Específicamente aquí.
Los símbolos proporcionados en TYPES no coinciden con los valores de la lista:
reviewable_updated: 902,
notification_created: 1001,
solved_accepted_solution: 1101,
solved_unaccepted_solution: 1102,
scope :active_grouped, -> { active.where.not(group: nil).group_by(&:group) }
def self.active
ids_to_exclude = []
unless defined?(SiteSetting.solved_enabled) && SiteSetting.solved_enabled
ids_to_exclude.concat([TYPES[:solved_accepted_solution], TYPES[:solved_unaccepted_solution]])
end
unless defined?(SiteSetting.assign_enabled) && SiteSetting.assign_enabled
ids_to_exclude.concat([TYPES[:assign_assigned], TYPES[:assign_unassigned]])
end
unless defined?(SiteSetting.topic_voting_enabled) && SiteSetting.topic_voting_enabled
ids_to_exclude.concat([TYPES[:voting_topic_upvote], TYPES[:voting_topic_unvote]])
end
unless defined?(SiteSetting.chat_enabled) && SiteSetting.chat_enabled
ids_to_exclude.concat(
Al equipo, aquí hay una posible solución:
def self.types_with_prefix(prefix)
TYPES.select { |key, _value| key.to_s.start_with?(prefix.to_s) }.values
end
def self.active
ids_to_exclude = []
unless defined?(SiteSetting.solved_enabled) && SiteSetting.solved_enabled
ids_to_exclude.concat(types_with_prefix(:solved))
end
unless defined?(SiteSetting.assign_enabled) && SiteSetting.assign_enabled
ids_to_exclude.concat(types_with_prefix(:assign))
end
unless defined?(SiteSetting.voting_enabled) && SiteSetting.voting_enabled
ids_to_exclude.concat(types_with_prefix(:voting_topic))
end
unless defined?(SiteSetting.chat_enabled) && SiteSetting.chat_enabled
ids_to_exclude.concat(types_with_prefix(:chat_message))
end
self.where.not(id: ids_to_exclude.flatten)
end
6 Me gusta
Gracias por informar de este problema
Lo solucioné hoy en esta PR:
main ← lis2:active-webhooks
opened 11:28PM - 04 Mar 24 UTC
Bug introduced when webhooks were granularized in this PR - https://github.com/d… iscourse/discourse/commit/c46811092994d456e7a67b33669b76e51aaa3668
Only active webhooks should be available when webhooks are configured.
https://meta.discourse.org/t/i18n-keys-showing-on-webhooks-edit-page/297701
5 Me gusta
nat
(Natalie T)
Cerrado
7 Marzo, 2024 04:39
6
Este tema se cerró automáticamente después de 2 días. Ya no se permiten nuevas respuestas.