Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ Download the latest release from [Tags] page and install the plugin using the
1. Create an Incoming Webhook on slack: https://api.slack.com/messaging/webhooks#create_a_webhook

2. Enter the webhook into the slacknotifier configuration section in DokuWiki's Configuration Settings

## Root Namespace

To include the root namespace, simply put a `:` in the namespace field in the config.
6 changes: 6 additions & 0 deletions event/PageSaveEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ public function getEventType(): ?string
*/
public function getNamespace(): string
{
// Handle special case of page being in root namespace
$pos = strpos($this->id, ':');
if ($pos === false) {
return ':';
}

return explode(':', $this->id, 2)[0];
}

Expand Down