Commit graph

47 commits

Author SHA1 Message Date
Trinity Pointard 5f059c3e98 Fix issues with tags and mentions
Fix issue where leading @ or # of a mention/hashtag get duplicated
Fix issue where normal tags were being overwritten by hashtags
2018-12-06 15:10:07 +01:00
fdb-hiroshima 449641d158
Add a search engine into Plume (#324)
* Add search engine to the model

Add a Tantivy based search engine to the model
Implement most required functions for it

* Implement indexing and plm subcommands

Implement indexation on insert, update and delete
Modify func args to get the indexer where required
Add subcommand to initialize, refill and unlock search db

* Move to a new threadpool engine allowing scheduling

* Autocommit search index every half an hour

* Implement front part of search

Add default fields for search
Add new routes and templates for search and result
Implement FromFormValue for Page to reuse it on search result pagination
Add optional query parameters to paginate template's macro
Update to newer rocket_csrf, don't get csrf token on GET forms

* Handle process termination to release lock

Handle process termination
Add tests to search

* Add proper support for advanced search

Add an advanced search form to /search, in template and route
Modify Tantivy schema, add new tokenizer for some properties
Create new String query parser
Create Tantivy query AST from our own

* Split search.rs, add comment and tests

Split search.rs into multiple submodules
Add comments and tests for Query
Make user@domain be treated as one could assume
2018-12-02 17:37:51 +01:00
fdb-hiroshima 74c398d60c
Run cargo clippy on whole project (#322)
* Run cargo clippy on plume-common

Run clippy on plume-common and adjuste code accordingly

* Run cargo clippy on plume-model

Run clippy on plume-model and adjuste code accordingly

* Reduce need for allocation in plume-common

* Reduce need for allocation in plume-model

add a quick compilation failure if no database backend is enabled

* Run cargo clippy on plume-cli

* Run cargo clippy on plume
2018-11-26 10:21:52 +01:00
fdb-hiroshima 8a4702df92 Add unit tests for main model parts (#310)
Add tests for following models:
- Blog
- Instance
- Media
- User
2018-11-24 12:44:17 +01:00
Baptiste Gelez 4a2f5aeeeb Display article covers 2018-10-31 15:07:40 +01:00
Baptiste Gelez 95326c09e0 Federate article covers 2018-10-31 15:07:40 +01:00
Baptiste Gelez 485aac2e20 Add an interface to select an article illustration 2018-10-31 15:07:40 +01:00
Baptiste Gelez ab5edbc6a5 Add a cover field to posts
Referencing the media to use to illustrate the article
2018-10-31 15:07:40 +01:00
Baptiste Gelez e26a150164 Make Authorization optional for read routes
Only require it when reading draft articles.
2018-10-30 18:13:49 +01:00
Trinity Pointard 76ca76f068 Update tags and hashtags on remote post edition 2018-10-29 20:54:27 +01:00
Trinity Pointard c4fc656809 Update mentions on remote post edition 2018-10-29 20:54:27 +01:00
Trinity Pointard f147885f08 Detect if tags are hashtags when receiving new posts 2018-10-29 20:54:27 +01:00
Trinity Pointard 9d7ae694a8 Delete notification on post deletion 2018-10-29 20:54:27 +01:00
Baptiste Gelez fcf911fac9 ActivityPub: don't delete anything if the actor is not authorized 2018-10-22 16:29:25 +01:00
Trinity Pointard 4e6f3209d5 Normalize panic message
Change all unwrap to expect
Normalize expect's messages
Don't panic where it could be avoided easily
2018-10-20 08:44:33 +02:00
Bat 387efbf3e9 Change default license to CC-BY-SA
Fixes #258
2018-10-06 18:19:45 +01:00
Bat 07f2c979ec Make the REST API compatible with SQlite 2018-09-30 14:21:07 +01:00
Bat 743620eb6a
Fix the SQlite build 2018-09-30 14:13:56 +02:00
Bat 38d737ed0c
Introduce features to choose between SQlite or Postgres 2018-09-30 14:13:54 +02:00
Bat 472da486e9 Fix the canapi::Provider impl for Post 2018-09-25 20:10:18 +01:00
Bat 1500267125 Add canapi and try to use for the API 2018-09-19 15:49:34 +01:00
Bat 10da8f31b6 Hide articles on public pages
Only show them in the dashboard
2018-09-10 20:06:00 +01:00
Bat 0f5f9101b6 Only notify for mention if it is not in a comment
To avoid two similar notifications
2018-09-08 12:53:17 +01:00
Bat 47be1541a7 Fix tag and mentions federation
Vec::append is not returning a value, but modifying the Vec
2018-09-07 21:38:22 +01:00
Bat 3918bd4501 Edit posts 2018-09-07 18:51:53 +01:00
Bat 413e34ac0e Federate article updating 2018-09-06 22:39:22 +01:00
Bat 7152d714ae Add a source property to posts
To store the Markdown
2018-09-06 20:00:55 +01:00
Bat dd9c4a6a73 Add a page to list articles by tag 2018-09-06 13:06:04 +01:00
Bat a54d2e9d71 Federate tags 2018-09-06 09:21:08 +01:00
Bat 5b3eca63e0 Make it possible to tag articles and display them 2018-09-05 21:18:27 +01:00
Bat 1496598a45 User feed 2018-09-05 15:21:50 +01:00
Bat babb3a81f5 Local timeline 2018-09-04 20:56:27 +01:00
Bat 94a386ea2c Add subtitles to articles
Fix #152
2018-09-04 12:26:13 +01:00
Bat cea548b821 Add a way to delete articles
Fixes #116
2018-09-01 16:28:47 +01:00
Bat 812b76b0de Use the creation date from ActivityPub when fetching remote articles 2018-07-27 00:29:21 +02:00
Bat 0314629d99 Improve the background article fetching code 2018-07-26 22:59:41 +02:00
Bat bd259891f3 Try to fetch remote articles 2018-07-26 22:23:53 +02:00
Bat 15477875da Fix links for post from remote blogs 2018-07-26 16:19:21 +02:00
Baptiste Gelez 16fb439ce9
Merge pull request #159 from Ilphrin/master
Add a link to the blog on article cards
2018-07-25 21:40:27 +02:00
Kevin "Ilphrin" Pellet aaae786fb7 Implement new function to Blog for the view
Added Blog::to_json and Blog::get_fqn
2018-07-25 21:22:42 +02:00
Bat 18125ab398 Paginate the homepage 2018-07-25 15:20:09 +02:00
Bat 5549e4d0e5 Merge branch 'master' of github.com:Plume-org/Plume 2018-07-24 14:32:11 +02:00
Kevin "Ilphrin" Pellet 89713526e2 Add a link to the blog on article cards
Fixes #134
2018-07-22 01:42:27 +02:00
Kevin "Ilphrin" Pellet cd24b0f057 Show the total number of article on a blog
fixes #150
2018-07-21 16:58:30 +02:00
Bat 67eb41add1 Add pagination to the blog page
No UI to control it yet
2018-07-20 18:42:35 +02:00
Bat 507d3e6183 Use USE_HTTPS to compute AP URLs
Instead of relying on cfg(debug_assertions)
2018-06-26 16:21:58 +02:00
Bat 68c7aad179 Big repository reorganization
The code is divided in three crates:
- plume-common, for the ActivityPub module, and some common utils
- plume-models, for the models and database-related code
- plume, the app itself

This new organization will allow to test it more easily, but also to create other tools that only reuse a little part of
the code (for instance a Wordpress import tool, that would just use the plume-models crate)
2018-06-23 17:36:11 +01:00
Renamed from src/models/posts.rs (Browse further)