Refactor hook module to also format Forgejo stuff

Temporarily disable some Gitlab features

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2024-08-31 00:36:05 +02:00 committed by pep
commit bcc8728cc8
5 changed files with 216 additions and 130 deletions

View file

@ -13,7 +13,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
use crate::hook::{format_hook, GitlabHook};
use crate::hook::{format_hook, Hook};
use log::debug;
use xmpp::jid::{BareJid, Jid};
@ -75,7 +75,7 @@ impl XmppClient {
}
}
pub async fn hook(&mut self, wh: GitlabHook) {
pub async fn hook(&mut self, wh: Hook) {
debug!("Received Hook");
if let Some(display) = format_hook(&wh) {
debug!("Hook: {}", display);