Help with Google Chat plugin

Hello,

I have been working on a new Taiga plugin that sends events to Google Chat, exactly like how the Slack plugin works.

Please see GitHub - mig5/taiga-contrib-googlechat: Taiga plugin for sending events to Google Chat, based heavily off of the Slack plugin

I approached this task by essentially copying the entire Slack plugin and changing names from ‘slack’ and ‘slackhook’ to ‘googlechat’ and ‘googlechathook’ respectively.

There are a few other small changes such as the fact that there’s no ‘channel’ field for a Google Chat space, and the formatting of the payloads when POSTing to the webhook is a bit different.

The actual functionality is working great, when there is a saved hook for Google Chat in the database.

The problem I have is on the ‘front’ side when configuring the plugin for a project. The frontend settings screen loads fine for setting the hook URL, choosing which types of notification to send events for, etc.

For some reason, I cannot get the ‘Save’ button to perform any POST or DELETE to add or delete the hook to the database in the backend. It works fine for the Slack plugin, and pretty much all I’ve done is change the names of various fields/modules/controllers… so I can’t work out what I’m missing?

If I insert a row directly into the database, everything works fine.

If I manually perform a POST request via my browser’s developer tools to the /api/v1/googlechat endpoint, it also adds the row just fine.

It’s just the ‘Save’ button that doesn’t do anything when I click on it.

Could a Taiga developer take a look at my repository above and give me any pointers as to what the problem is? I’m new to Angular and more of a backend dev/sysadmin than frontend, unfortunately.

If you help me fix it, I would gladly submit it as an official plugin if you’d like it. I see someone else is already asking for it: Has anyone used web hooks to send notification to Google Chats? - #2 by Chadys

Thank you very much!

I somehow got it working. I think it had to do with case-sensitive names, but I’m not sure. This commit fixed it: fixes · mig5/taiga-contrib-googlechat@7061a12 · GitHub