Skip to content

Gotify Plugin Not Functioning #445

@stubbers

Description

@stubbers

Describe the bug
The Gotify plugin is stripping the second forward slash from the protocol part of the Gotify URL

[pmon] 2020-11-16 02:35:41 debug : Gotify: Sending to https:/gotify.example.net/message: {"title":"Example Alias Title","message":"Example message","priority":5}

The issue occurs regardless of whether you include the protocol or not in the configuration and even if you add extra slashes.

I believe the case is the use of path.join:

url = path.join(url, 'message'); // Append /message to URL

I can find nothing in the NodeJS docs that state path can be used with URLs (ref - https://nodejs.org/api/path.html).

To Reproduce
Steps to reproduce the behavior:

  1. Configure the Gotify plugin including activitating it for an alias
  2. Monitor logs for the above message that shows the incorrect URL

Expected behavior
URL does not have the second forward slash stripped

Screenshots
N/A

Environment information:

  • OS: Docker Image
  • Other details:

Additional context
I've never managed to get the Gotify plugin to work but debugged the reason why recently

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions