From 2bae92f066e275422938e86d7f2ebec129287b12 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 23 Jan 2020 16:05:32 +0100 Subject: [PATCH] ALL and SESSION constants for push --- api/src/Json/Push.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/api/src/Json/Push.php b/api/src/Json/Push.php index 24c6070d61..277afe991c 100644 --- a/api/src/Json/Push.php +++ b/api/src/Json/Push.php @@ -40,12 +40,21 @@ class Push extends Msg */ protected $account_id; + /** + * Push to all clients / broadcast + */ + const ALL = 0; + /** + * Push to current session + */ + const SESSION = null; + /** * * @param int $account_id =null account_id to push message too or - * null: for current session only or 0 for whole instance / broadcast + * self::SESSION(=null): for current session only or self::ALL(=0) for whole instance / broadcast */ - public function __construct($account_id=null) + public function __construct($account_id=self::SESSION) { $this->account_id = $account_id; }