Commit Graph

61 Commits

Author SHA1 Message Date
jld3103
e6e2b873a3 Remove unreachable UserStatus#clearStatus route
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-05-08 14:16:54 +02:00
Joas Schilling
90a817cee5 feat(status): Add a capability for the restore
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-04-18 14:58:12 +02: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 +02:00
jld3103
1f49a56a98 Fix user_status heartbeat response
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-01-25 07:16:26 +01:00
Joas Schilling
f998fe0af3 Update the user status dashboard widget and fix the icon color
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-01-02 11:38:27 +01:00
Carl Schwan
f8453df98e Properly escape underscore in db query
Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-13 18:50:36 +02:00
Carl Schwan
8c95e46744 Do the filtering on the DB instead
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-13 16:19:11 +02:00
tobiasKaminsky
cfdca11ad9 Filter out backup user status (those beginning with _ as userId) 2022-10-13 09:04:27 +02:00
Robin Appelman
9ba26ee326 set round item icons for user status widget
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-09-15 18:06:22 +02:00
Julien Veyssier
500ba958f3 implement IButtonWidget and IIconWidget in user_status
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-09-15 18:06:21 +02:00
Julien Veyssier
8e2e3b4a9f implement IAPIWidget in user_status
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-09-15 18:06:21 +02:00
luz paz
9d26671f05 Fix typos in apps/ subdirectory
Found via `codespell -q 3 -S l10n,./apps/files_external/3rdparty -L adn,ba,boxs,keypair,jus,optionel,ressource,tabel ./apps/`

Signed-off-by: luz paz <luzpaz@github.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2022-09-05 12:59:54 +00: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 +02:00
jld3103
3e7a36b309 Make user status heartbeat API publicly accessible
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2022-07-21 13:07:34 +02:00
Joas Schilling
159272bb93 Fix predefined message
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-07-01 12:33:07 +02: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 +02: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 +02: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 -03:00
Carl Schwan
1dbe7dafe2 Fetch status in heartbeat controller only once
Store the user status inside the event instead of fetching it again

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-07 15:16:34 +02:00
Christopher Ng
1fc0b4320c Add global profile toggle config
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-03-18 02:55:12 +00: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 +01: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 +01: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 +01:00
Joas Schilling
658547d274 Don't include unindexed is_backup in the query, it's ensured by the user_id leading underscore already
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-15 16:06:33 +01: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 +01: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 +01: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 +01:00
Louis Chemineau
adfb9010d4 Migrate to webpack v5
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-01-08 10:12:47 +01:00
John Molakvoæ (skjnldsv)
b664aad7ab Move bundles to /dist
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2022-01-08 10:11:58 +01:00
Christoph Wurst
6ef63d27a8 Make the UserStatusMapper a generic instance of QBMapper
This removes our manual overrides and helps static analysis.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-12-29 15:40:06 +01:00
Vincent Petry
fd487c1a43 Merge pull request #29432 from nextcloud/fix/support-php-8.1
Support PHP 8.1 - First batch
2021-11-23 15:41:20 +01: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 +01:00
Côme Chilliet
113756db30 Fix ArrayAccess and JsonSerializable return types
First round of modifications for PHP 8.1

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:56 +01: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 +02:00
Pytal
f7b3d521f8 Merge pull request #28751 from nextcloud/feat/28139/profile-page 2021-10-18 23:03:58 -07:00
Christopher Ng
309354852f Profile backend
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2021-10-19 04:59:35 +00: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 +02:00
kesselb
224fdc10f4 Revert "Fix Recent statuses plural/singular"
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-08-09 19:33:25 +02:00
szaimen
3897b68883 Fix Recent statuses plural/singular
Signed-off-by: szaimen <szaimen@e.mail.de>
2021-08-08 21:04:48 +02:00
Joas Schilling
38d2f978a6 Save a request everytime we send the heartbeat
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-06-16 11:32:32 +02: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 +02: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 +02:00
John Molakvoæ (skjnldsv)
215aef3cbd Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +02:00
Christoph Wurst
c1d4f8161b Migrate internal classes to the OCP db col types
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-12 14:09:13 +01:00
Joas Schilling
7a1750af44 Make is_user_defined nullable so we can store false on oracle
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-11 14:04:09 +01:00
Simon Spannagel
ad58d13814 UserStatus: no message means clear status message. This fixes #23332
Signed-off-by: Simon Spannagel <simonspa@kth.se>
2020-11-02 17:59:44 +01:00
Joas Schilling
ee7eb6f2b3 Some emojis are in CHAR_CATEGORY_GENERAL_OTHER_TYPES
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-13 15:32:34 +02:00
Christoph Wurst
d9015a8c94 Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +02:00
Roeland Jago Douma
5451dcbec5 Merge pull request #23112 from nextcloud/bugfix/noid/increase-timeout-of-statuses
Increase the timeout of statuses
2020-10-01 11:43:36 +02:00
Joas Schilling
0c7c358d13 Increase the timeout of statuses
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-01 08:54:35 +02:00