geluk / matrix-webhook-gateway

Webhook gateway for Matrix / Synapse. Create and manage webhooks in Matrix channels for multiple services.
MIT License
18 stars 4 forks source link

Plugin formatting fuctionn ol() doesn't work #13

Closed Dual-0 closed 2 years ago

Dual-0 commented 3 years ago

Hi,

first of all: thanks for this amazing webhook gateway. The plugin building is great. No more E-Mail notifications about my infrastructure and or app updates. Thanks for this!

Today I try the ol() function to create bullet point list but the log shows me this error:

2021-09-29 22:32:00.617.000         ERROR         [webhook-srv]                    Failed to handle webhook invocation:
Error         entries.map is not a function

Thanks

geluk commented 3 years ago

I'm glad you like it! Off the top of my head, there are two things that could be going wrong here:

Could you check if one of these is the case?

geluk commented 3 years ago

Never mind, I found the issue. The way I've documented the ol() function in the readme isn't correct. It says:

ol(a('https://example.com', 'first'), 'second', 'third')

But the function currently only accepts arrays, so it has to be called like this:

ol([a('https://example.com', 'first'), 'second', 'third'])

In the next version I'll update the function to accept multiple arguments as well, but for now, making the change I've shown above should work.

geluk commented 2 years ago

Implemented in version 1.1.