Joas Schilling
4e0595fb0f
Fix JSON error when comment has no reactions
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-05-09 09:53:49 +07:00
Joas Schilling
0d87335751
Merge pull request #31703 from nextcloud/techdebt/noid/emojihelper-interface
...
Emojihelper interface
2022-04-29 18:31:29 +07:00
Joas Schilling
7c85f8dea4
Make the order of reactions reliable
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-28 16:13:41 +07:00
Vitor Mattos
a75a22f3ac
Increase check if support reactions
...
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-04-28 07:09:44 +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
367be7c55f
Allow reactions also with other combined emojis
...
Honerful copying the EmojiService from UserStatus for now
I think this should be put into a decent place and then reused,
but I couldn't find somethin short term before beta1
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-24 15:13:09 +07:00
Joas Schilling
d05dca0c1c
Simplify comment search in special cases
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-18 09:22:16 +07:00
Vitor Mattos
8ec7c5c8ae
Update ICommentsManager with reaction methods
...
Fix psalm errors
Reorder methods and remove return null
Use best pattern on docblock
Goals: update https://github.com/ChristophWurst/nextcloud_composer/ with reaction methods.
The script
https://github.com/ChristophWurst/nextcloud_composer/blob/master/build.sh
only get lib/public classes
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-02-03 12:52:18 +07:00
Joas Schilling
e8c66d0f89
Merge pull request #30794 from nextcloud/techdebt/noid/allow-to-get-comments-with-verb
...
Allow to get comments with a given set of verbs
2022-01-28 16:41:42 +07:00
Joas Schilling
1ceba64863
Allow to get comments with a given set of verbs
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-21 13:42:04 +07:00
Vitor Mattos
b9f74584a1
Fix check after change from string to mb_string
...
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:39:41 +07:00
Joas Schilling
c9f2f00777
Fix CS
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-21 08:39:40 +07:00
Joas Schilling
ecb98f772e
Throw if trying to save reaction without support
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-21 08:39:40 +07:00
Joas Schilling
e0b89cd576
Only check mb_strlen()
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-21 08:39:40 +07:00
Joas Schilling
d850dc0220
Remove order from groupConcat as it is not working everywhere
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-21 08:39:39 +07:00
Joas Schilling
189f9f96ce
Limit the summary and sort it afterwards
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-21 08:39:39 +07:00
Vitor Mattos
f071b4dfbb
Fix groupConcat and ordering on Oracle
...
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:39:39 +07:00
Vitor Mattos
f7cd995612
Order the reaction summary, improvements on validations
...
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:39:39 +07:00
Vitor Mattos
1ce894a50c
Disable reactions if database don't support utf8mb4
...
Fix column size
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:39:37 +07:00
Vitor Mattos
898e87fe1a
Rename vars and move logic to method
...
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:37:07 +07:00
Vitor Mattos
a7c0868a4c
Prevent violate constraint
...
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:37:06 +07:00
Vitor Mattos
1dda03e1b5
Rename vars
...
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:37:05 +07:00
Vitor Mattos
9efbc9c1d5
Add comments reactions
...
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:37:04 +07:00
Joas Schilling
2166cfde9e
Allow to count comments with multiple verbs
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-26 12:29:44 +07:00
Mátyás Jani
1018eb4411
Fix SQL type error
...
Fixing the following SQL error encountered with PostgreSQL:
SQLSTATE[42883]: Undefined function: 7 ERROR:
No operator matches the given name and argument types. You might need to add explicit type casts.
This prevented the Nextcloud apps/files page to show the files and directories. See #27881
2021-08-17 15:10:38 +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
6578a93463
Merge pull request #27053 from nextcloud/bugfix/noid/dont-throw-when-comments-is-disabled
...
Don't throw when comments is disabled
2021-06-02 15:40:51 +07:00
Joas Schilling
c0c5340f4e
Fix populating the array and closing the cursors
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-06-01 09:15:34 +07:00
Simounet
a50eba16ad
Fix Oracle query limit compliance in Comments
...
Signed-off-by: Simounet <contact@simounet.net>
2021-05-28 08:48:01 +07:00
Joas Schilling
5ae5729664
Don't throw when comments is disabled
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-05-21 12:04:23 +07:00
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +07:00
Joas Schilling
ede7510854
Add a function to get the unread count for multiple objects in one go
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-04 11:01:21 +07:00
Joas Schilling
2dd50b4adc
Fix return type
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-21 11:02:05 +07:00
Joas Schilling
6400221fba
Less magic
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-21 09:47:40 +07:00
Joas Schilling
d462439a63
Get the last comment date for a list of actors (to allow sorting mention suggestions e.g.)
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-21 09:18:51 +07:00
Joas Schilling
89651c5233
Allow to search on multiple objects with one query
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-21 09:16:42 +07:00
Joas Schilling
326640462b
Add methods to get the number of comments and last comment since a date
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-21 09:15:38 +07:00
Joas Schilling
2cc35cc65d
Include an option to also include the lastKnownCommentId object
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-21 09:08:48 +07:00
John Molakvoæ (skjnldsv)
3e1916080a
Add ICommentsManager::load method
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-10-20 14:39:28 +07:00
Joas Schilling
17454f6ce9
Use PSR logger interface in comments manager
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-07 08:57:45 +07:00
Morris Jobke
99c9423766
Remove @suppress SqlInjectionChecker
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-16 15:53:56 +07:00
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
...
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +07:00
Joas Schilling
60d9384e5e
Optionally write the reference id into the database
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-03-31 10:51:16 +07:00
Joas Schilling
a20e81f0f3
Allow to set and get the reference id
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-03-31 10:51:16 +07:00
Arthur Schiwon
4c7bd11fc8
for the DB ot pick an index specify the object_type
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-02-03 16:17:25 +07:00
Christoph Wurst
5bf3d1bb38
Update license headers
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +07:00
Roeland Jago Douma
68748d4f85
Some php-cs fixes
...
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +07:00
Joas Schilling
e4b36f4f47
Fix user with id 0 to be able to comment
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-09-25 09:07:07 +07:00
Joas Schilling
7d3a349d8f
PHPStorm code cleanup
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-07-24 10:39:57 +07:00
Joas Schilling
3b334169a8
Get the topmost parent for the parent instead of doing endless recursion
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-07-24 10:39:22 +07:00