Joas Schilling
6056928dc6
feat(comments): Add a meta data column for comments
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 months ago
Vitor Mattos
5ed6722dd2
Cover expire_date with unit tests
Signed-off-by: Vitor Mattos <vitor@php.rio>
1 year ago
Vitor Mattos
e9295f739e
Split the comments ids by chunks
Split the comments ids by chunks to prevent error with Oracle database
that can't do a query with more than 1000 parameters.
https://github.com/nextcloud/spreed/issues/8287
Signed-off-by: Vitor Mattos <vitor@php.rio>
1 year ago
Côme Chilliet
f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Vitor Mattos
7a0648757a
Delete comments that expired now
Signed-off-by: Vitor Mattos <vitor@php.rio>
1 year ago
Joas Schilling
d722a0c12a
Adjust fake manager
Signed-off-by: Joas Schilling <coding@schilljs.com>
2 years ago
Joas Schilling
198224bf7a
Allow to expire comments of multiple objects with one call
Signed-off-by: Joas Schilling <coding@schilljs.com>
2 years ago
Vitor Mattos
3be1217c04
Follow the most common pattern used in project
```
git grep strval|wc -l
32
git grep "(string)"|wc -l
481
```
Signed-off-by: Vitor Mattos <vitor@php.rio>
2 years ago
Vitor Mattos
c59b0c2ff7
Add comments expire date
https://github.com/nextcloud/spreed/pull/7327
Signed-off-by: Vitor Mattos <vitor@php.rio>
2 years ago
Joas Schilling
902476fa20
Extract the EmojiService from user status and add an OCP interface
Signed-off-by: Joas Schilling <coding@schilljs.com>
2 years ago
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>
2 years ago
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>
2 years ago
Joas Schilling
429380337f
Fix fake manager
Signed-off-by: Joas Schilling <coding@schilljs.com>
2 years ago
Vitor Mattos
7bb01b6ccc
Refactor and fixes on tests
Signed-off-by: Vitor Mattos <vitor@php.rio>
2 years ago
Vitor Mattos
b9f74584a1
Fix check after change from string to mb_string
Signed-off-by: Vitor Mattos <vitor@php.rio>
2 years ago
Joas Schilling
189f9f96ce
Limit the summary and sort it afterwards
Signed-off-by: Joas Schilling <coding@schilljs.com>
2 years ago
Vitor Mattos
f7cd995612
Order the reaction summary, improvements on validations
Signed-off-by: Vitor Mattos <vitor@php.rio>
2 years ago
Vitor Mattos
1ce894a50c
Disable reactions if database don't support utf8mb4
Fix column size
Signed-off-by: Vitor Mattos <vitor@php.rio>
2 years ago
Vitor Mattos
52affa9ddd
Skip if dont support 4 bytes UTF8
Signed-off-by: Vitor Mattos <vitor@php.rio>
2 years ago
Vitor Mattos
425b5cf081
Add unit tests
Signed-off-by: Vitor Mattos <vitor@php.rio>
2 years ago
Joas Schilling
03abaaaee5
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2 years ago
Joas Schilling
3487aeeb1f
Add integration tests for group
Signed-off-by: Joas Schilling <coding@schilljs.com>
2 years ago
Joas Schilling
86109f77e0
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 years ago
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>
3 years ago
Joas Schilling
1f1244fdcc
Fix PHP CS
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 years ago
Joas Schilling
8600e51df5
Fix manager creation and testing
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 years ago
John Molakvoæ (skjnldsv)
3e1916080a
Add ICommentsManager::load method
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
3 years ago
Morris Jobke
234b510652
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
3 years ago
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>
4 years ago
Christoph Wurst
14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
2ee65f177e
Use the shorter phpunit syntax for mocked return values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Roeland Jago Douma
3a7cf40aaa
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
Roeland Jago Douma
c007ca624f
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
Joas Schilling
092d34d9df
Add a unit test for guests as well
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
10ba0bed8a
Match mentions when the username is wrapped in quotes
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
66945f9574
Allow to filter the unread count by verb
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
Joas Schilling
ac2314e3d0
Add pagination support
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
Joas Schilling
8c7969e730
Allow to search by comments
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
Mario Danic
d959ca8eb0
Add another test
Signed-off-by: Mario Danic <mario@lovelyhq.com>
6 years ago
Mario Danic
5acdd45b77
Add a new regex test
Signed-off-by: Mario Danic <mario@lovelyhq.com>
6 years ago
Joas Schilling
cccdfaa6e9
Fix FakeManager
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
Joas Schilling
f50abde7ac
Add proper comment offset support
The offset is based on the last known comment instead of limit-offset,
so new comments don't mess up requests which get the history of an object-
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
Arthur Schiwon
3784fa2074
comments should compile mentions also if done by author
it is used by clients for formatting reasons, there is no reason not format
the author if her handle is included in the comment body.
It is unrelated to sending out notifications.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
6 years ago
Arthur Schiwon
d5f1cef642
fix comment sorter
background: we have a flat hierarchy of comments, not a tree. therefore we
can also remove again the unnecessary additions.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
6 years ago
Arthur Schiwon
fd6daf8d19
AutoCompletion backend
* introduce a Controller for requests
* introduce result sorting mechanism
* extend Comments to retrieve commentors (actors) in a tree
* add commenters sorter
* add share recipients sorter
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
6 years ago
Joas Schilling
20f8d1094a
Can not insert auto increment on oracle
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago
Robin Appelman
2a4d9f71af
update FakeManager
Signed-off-by: Robin Appelman <robin@icewind.nl>
7 years ago
Robin Appelman
212d9fd277
Add test for getting unread comment count by folder
Signed-off-by: Robin Appelman <robin@icewind.nl>
7 years ago