summaryrefslogtreecommitdiffstats
path: root/lib/private/Comments
Commit message (Collapse)AuthorAgeFilesLines
* Add a function to get the unread count for multiple objects in one goJoas Schilling2020-11-041-0/+40
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix PHP CSJoas Schilling2020-10-221-2/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix manager creation and testingJoas Schilling2020-10-221-6/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix return typeJoas Schilling2020-10-211-1/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Less magicJoas Schilling2020-10-211-4/+12
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Get the last comment date for a list of actors (to allow sorting mention ↵Joas Schilling2020-10-211-0/+44
| | | | | | suggestions e.g.) Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow to search on multiple objects with one queryJoas Schilling2020-10-211-2/+21
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add methods to get the number of comments and last comment since a dateJoas Schilling2020-10-211-0/+55
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Include an option to also include the lastKnownCommentId objectJoas Schilling2020-10-211-3/+7
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add ICommentsManager::load methodJohn Molakvoæ (skjnldsv)2020-10-202-6/+24
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Use PSR logger interface in comments managerJoas Schilling2020-10-072-14/+17
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-16/+16
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove @suppress SqlInjectionCheckerMorris Jobke2020-09-161-3/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headers for 19Christoph Wurst2020-04-291-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-102-17/+15
| | | | | | | | | | | | | | | 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>
* Fix (array) indent style to always use one tabChristoph Wurst2020-04-091-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Optionally write the reference id into the databaseJoas Schilling2020-03-311-22/+61
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow to set and get the reference idJoas Schilling2020-03-312-0/+32
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* for the DB ot pick an index specify the object_typeArthur Schiwon2020-02-031-4/+6
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Update license headersChristoph Wurst2019-12-053-3/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-223-1/+3
| | | | | | | | | | | * 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>
* Fix user with id 0 to be able to commentJoas Schilling2019-09-252-5/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* PHPStorm code cleanupJoas Schilling2019-07-241-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Get the topmost parent for the parent instead of doing endless recursionJoas Schilling2019-07-241-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow guest mentions of talk to be parsedJoas Schilling2019-07-101-2/+7
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow apps to overwrite the maximum length when reading from databaseJoas Schilling2019-07-011-6/+16
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow apps to store longer messages in the comments APIJoas Schilling2019-06-261-3/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Rewrite getNumberOfUnreadCommentsForFolder queryRoeland Jago Douma2018-12-201-14/+29
| | | | | | | | | | | Before the joining and filtering removed unkown files. Resulting in manual queries for all the files with no (unread) comments (the 99%). Long story short. This will return a list of all the files in the parent folder with their unread comment count (can be 0). But this makes sure that the result is properly cached. In the dav handling. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Use the defined func()->count() instead of manual countingJoas Schilling2018-11-081-6/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Match mentions when the username is wrapped in quotesJoas Schilling2018-11-071-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Properly escape column name in "createFunction" callMorris Jobke2018-10-161-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Allow to filter the unread count by verbJoas Schilling2018-07-301-2/+7
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add pagination supportJoas Schilling2018-07-251-2/+8
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow to search by commentsJoas Schilling2018-07-251-0/+42
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* New regex to match mentionsMario Danic2018-06-081-1/+1
| | | | Signed-off-by: Mario Danic <mario@lovelyhq.com>
* Remove unsupported modifierMario Danic2018-06-081-1/+1
| | | | Signed-off-by: Mario Danic <mario@lovelyhq.com>
* Fix mentions regexMario Danic2018-06-081-1/+1
| | | | Signed-off-by: Mario Danic <mario@lovelyhq.com>
* Only query last comment info, when there is oneJoas Schilling2018-04-231-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix docsJoas Schilling2018-04-191-8/+10
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add proper comment offset supportJoas Schilling2018-04-181-0/+115
| | | | | | | 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>
* Use type casting instead of *val() methodMorris Jobke2018-01-261-10/+10
| | | | | | It should be up to 6x faster Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* comments should compile mentions also if done by authorArthur Schiwon2018-01-171-4/+0
| | | | | | | | 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>
* Update license headersMorris Jobke2017-11-063-1/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Can not insert auto increment on oracleJoas Schilling2017-08-021-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Oracle does not support PDO::FETCH_KEY_PAIRJoas Schilling2017-08-021-6/+13
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add Phan plugin to check for SQL injectionsLukas Reschke2017-07-201-0/+1
| | | | | | | | | | This adds a phan plugin which checks for SQL injections on code using our QueryBuilder, while it isn't perfect it should already catch most potential issues. As always, static analysis will sometimes have false positives and this is also here the case. So in some cases the analyzer just doesn't know if something is potential user input or not, thus I had to add some `@suppress SqlInjectionChecker` in front of those potential injections. The Phan plugin hasn't the most awesome code but it works and I also added a file with test cases. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* a parameter too muchArthur Schiwon2017-06-141-2/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Remove unused use statementsMorris Jobke2017-04-221-1/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* use castColumnRobin Appelman2017-03-301-4/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add test for getting unread comment count by folderRobin Appelman2017-03-301-5/+6
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>