File tree Expand file tree Collapse file tree 1 file changed +20
-11
lines changed Expand file tree Collapse file tree 1 file changed +20
-11
lines changed Original file line number Diff line number Diff line change 2727
2828use OCP \EventDispatcher \Event ;
2929use OCP \IUser ;
30+ use OCP \UserStatus \IUserStatus ;
3031
3132/**
3233 * @since 20.0.0
@@ -51,19 +52,12 @@ class UserLiveStatusEvent extends Event {
5152 */
5253 public const STATUS_OFFLINE = 'offline ' ;
5354
54- /** @var IUser */
55- private $ user ;
56-
57- /** @var string */
58- private $ status ;
59-
60- /** @var int */
61- private $ timestamp ;
55+ private IUser $ user ;
56+ private string $ status ;
57+ private int $ timestamp ;
58+ private ?IUserStatus $ userStatus = null ;
6259
6360 /**
64- * @param IUser $user
65- * @param string $status
66- * @param int $timestamp
6761 * @since 20.0.0
6862 */
6963 public function __construct (IUser $ user ,
@@ -98,4 +92,19 @@ public function getStatus(): string {
9892 public function getTimestamp (): int {
9993 return $ this ->timestamp ;
10094 }
95+
96+ /**
97+ * Get the user status that might be available after processing the event
98+ * @since 24.0.0
99+ */
100+ public function getUserStatus (): ?IUserStatus {
101+ return $ this ->userStatus ;
102+ }
103+
104+ /**
105+ * @since 24.0.0
106+ */
107+ public function setUserStatus (IUserStatus $ userStatus ) {
108+ $ this ->userStatus = $ userStatus ;
109+ }
101110}
You can’t perform that action at this time.
0 commit comments