Commit Graph

39 Commits (b9ab00a59e2d906fdb43eaaea37eb7a4a9cc8a13)

Author SHA1 Message Date
Joas Schilling f3a26c5f89
fix(user_status): Avoid unique constraint violations from parallel heartbeats and GET requests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-05-30 08:53:18 +07:00
Anna Larch 8af7ecb257 chore: adjust code to adhere to coding standard
Signed-off-by: Anna Larch <anna@nextcloud.com>
2024-09-05 21:23:38 +07:00
Joas Schilling 2c977d2b6e
fix(userstatus): Fix user status automation in real-life scenario
Order of applying:
- Out-of-office
- Availability
- Call
- Meeting
- User status

Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-06-25 09:29:35 +07:00
Andy Scherzinger 8d8891c5bc
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-30 15:49:33 +07:00
Joas Schilling 587a056db3
fix(status): Update status time when reverting to it manually
This prevents the DAV meeting status from overwriting it again

Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-04-17 11:32:16 +07:00
Anna Larch c071fbf3ac fix(userstatus): add back 0 timestamp for status without message
Signed-off-by: Anna Larch <anna@nextcloud.com>
2024-02-12 13:24:08 +07:00
Anna Larch e1b957e17b fix(userstatus): CALL status should overwrite MEETING status
Signed-off-by: Anna Larch <anna@nextcloud.com>
2024-01-24 18:23:21 +07:00
Anna Larch 4c6eff975f fix(userstatus): set user status to 'In a meeting' if calendar is busy
Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-12-19 14:59:00 +07:00
Joas Schilling 73c0f596f7
fix(copyright): Fix copyright doc blocks
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-11-30 11:53:47 +07:00
Anna Larch f19645adab enh(userstatus): add OOO automation and remove calendar automation
Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-11-28 10:28:06 +07:00
Joas Schilling aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +07:00
Christoph Wurst bdad290d31
fix(userstatus): Only track message timestamp for values
Do not track status messages that are empty, e.g. DND outside of
availability.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-11-16 12:45:22 +07:00
Christoph Wurst fc1dd985c8
fix(userstatus): Do not override message timestamp for default messages
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-11-13 09:53:28 +07:00
Anna Larch f14a4f8fd7 feat(user status): automate user status for events
and automatically set a user status to free or busy depending on their calendar
transparency, event status and availability settings

Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-11-09 16:20:19 +07:00
Christoph Wurst fbdf733be0
fix(userstatus): Track message timestamp too
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-09-29 09:55:19 +07:00
Joas Schilling 64776ff042
feat(user_status): Allow to manually revert an automated status
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-04-18 14:57:44 +07:00
Joas Schilling 9a9db2802b
Reset user status based on message ID only
Since some statuses (call) can occure with different status
(away and dnd) we need to reset only based on the message id.
But as it can not be set by the user this is still save and okay.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-07-22 11:02:37 +07:00
Joas Schilling 1429a9a8ef
Also reset the status on clearAt
When you set yourself to "DND - In a meeting" for one hour,
the expectation is that you are also "online"/normal again
when the meeting is over. So we extend the logic to also include
the status itself to be reverted.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-05-27 11:32:53 +07:00
Joas Schilling 5f2e7e9710
Fix missing status with predefined status in drop-down
When a predefined status message was used, the status was not "processed"
so it was missing the translated message and the icon in the dropdown and the menu afterwards

Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-05-27 09:21:33 +07:00
Joas Schilling 902476fa20
Extract the EmojiService from user status and add an OCP interface
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-28 07:09:44 +07:00
Joas Schilling bac2508d77
Fix user status not resetting correctly after a call
Only happens when the user navigated away and came back,
so the heartbeat updates the status to "Online + In a call"
After that resetting away from "Away + In a call" does not match anymore
and the previous status sticks

Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-11 13:03:15 +07:00
Joas Schilling 058d1de260
Do status and predefined message setting in one go
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-15 16:06:33 +07:00
Joas Schilling 5fcbb1ca62
Create the backup user status in 1 query instead of 3
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-15 16:06:33 +07:00
Joas Schilling deec4f31db
Allow to revert the user status of multiple users in 3 queries instead of 3*n
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-15 16:06:33 +07:00
Joas Schilling 194338cca3
Delete the user status without loading it first
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-15 16:06:32 +07:00
Joas Schilling c5d11abff9
Directly delete the user status instead of getting it a second time
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-15 16:06:32 +07:00
Carl Schwan 92fe694b7f
Fix multiple bugs with user status
* Fix editing the status while on a call, don't send a bogus request
* Clean backup user status when setting up a new status manually
* A bit more type hinting

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-11-23 12:21:42 +07:00
Jonas Meurer 3fe267b772
Respect user enumeration settings in user status lists
So far, the functions to find user statuses listed didn't respect user
enumeration settings (`shareapi_allow_share_dialog_user_enumeration`
and `shareapi_restrict_user_enumeration_to_group` core app settings).

Fix this privacy issue by returning an empty list in case
`shareapi_allow_share_dialog_user_enumeration` is unset or
`shareapi_restrict_user_enumeration_to_group` is set.

In the long run, we might want to return users from common groups if
`shareapi_restrict_user_enumeration_to_group` is set. It's complicated
to implement this in a way that scales, though. See the discussion at
https://github.com/nextcloud/server/pull/27879#pullrequestreview-753655308
for details.

Also, don't register the user_status dashboard widget at all if
`shareapi_allow_share_dialog_user_enumeration` is unset or
`shareapi_restrict_user_enumeration_to_group` is set.

Fixes: #27122

Signed-off-by: Jonas Meurer <jonas@freesources.org>
2021-10-20 11:33:23 +07:00
Carl Schwan 2cb48f484b
Add an API to set and rollback the user status
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-10-18 20:31:37 +07:00
blizzz 56b68ce4e0
Merge pull request #27375 from nextcloud/bugfix/noid/dont-update-offline-status
Don't update statuses to offline again and again
2021-06-07 12:12:33 +07:00
Joas Schilling 55c44580c2
Don't update statuses to offline again and again
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-06-07 09:32:00 +07:00
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Joas Schilling 0c7c358d13
Increase the timeout of statuses
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-01 08:54:35 +07:00
Georg Ehrke d7ccc616e4
Always use IUserStatus consts
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-09-07 11:30:18 +07:00
Georg Ehrke 7fedd33825
Better cleanup routine for statuses
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-09-07 09:22:38 +07:00
Georg Ehrke a352a7c7f3
Introduce consts for statuses
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-09-07 09:22:34 +07:00
Georg Ehrke bd6a6cf3bf
Add Status Dashboard
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-08-20 15:43:34 +07:00
Georg Ehrke 0e0e0d19e8
Provide a PHP Api for UserStatus
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-08-05 13:48:46 +07:00
Georg Ehrke 0fad921840
Add user-status app
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-07-31 16:45:27 +07:00