Skip to content

Commit

Permalink
Fix creation method
Browse files Browse the repository at this point in the history
  • Loading branch information
ben221199 committed May 21, 2024
1 parent a28d1c0 commit d190ea1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,11 @@ public static function createRequestMessageV2($id,string $method,$params=null):
* @param object|array|null $params
* @param bool $version2
* @return NotificationMessage
* @throws JSONRPCException
*/
public static function createNotification(string $method,$params=null,bool $version2=true): NotificationMessage{
if($version2){
return self::createNotificationMessageV1($method,$params);
return self::createNotificationMessageV2($method,$params);
}
return self::createNotificationMessageV1($method,$params ?? []);
}
Expand Down

0 comments on commit d190ea1

Please sign in to comment.