1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-21 16:46:11 +02:00

Merge pull request #686 from apfelbox/hipchat-from

[HipChatHandler] Always send the "from" name
This commit is contained in:
Jordi Boggiano
2015-11-18 17:12:52 +00:00
2 changed files with 33 additions and 3 deletions

View File

@@ -146,7 +146,12 @@ class HipChatHandler extends SocketHandler
// if we are using the legacy API then we need to send some additional information
if ($this->version == self::API_V1) {
$dataArray['room_id'] = $this->room;
$dataArray['from'] = $this->name;
}
// append the sender name if it is set
// always append it if we use the v1 api (it is required in v1)
if ($this->version == self::API_V1 || $this->name !== null) {
$dataArray['from'] = (string) $this->name;
}
return http_build_query($dataArray);