Chat webhooks

NodeBB Development
  • #1

    I'm trying to fire a hook whenever a new chat message is sent. I noticed there's a hook called action:chat.sent. My plugin however does not get that hook fired even when a new chat message is sent for some reason.

    I also noticed there's filter:messaging.parse and filter:parse.raw but these fire with all chat data, meaning that if I sent one message but in my history I have more messages, the hook will fire with all previous messages as well, and I would only like it to fire once when a new chat is sent. As a workaround I guess I can bind to filter:messaging.parse and manually filter out anything that isn't isNew: false, but I am looking for something cleaner if possible.

Suggested Topics

| | | |