Commit Graph

64 Commits (8aa4ae43022889a93231cb8566c70d9239a80be5)

Author SHA1 Message Date
Violet Myers f3c05dae62 Email blocklisting (#718)
* Interface complete for the email blacklisting

* Everything seems to work

* Neutralize language

* fix clippy warnings

* Add missing spaces

* Added matching test

* Correct primary key datatype for postgresql

* Address review comments

* Add placeholder when empty. Fix missing 'i'
4 years ago
fdb-hiroshima a9441a8804 Fix lettre (#706)
* Use lettre from crates.io instead of git

* fix previous migration

they were failing on some versions of sqlite and postgres
5 years ago
fdb-hiroshima 6c8944315a remove use of rust in migration (#704)
* remove use of rust in migration

rewrite use_timelines_for_feed in pure sql
delete tantivy related migration. It will require reintroducing tantivy
initialisation in docs

fix #702

* Fill timeline from migrations

should fix #692 , but probably require some testing
5 years ago
Violet White f0846ff546 Make the search index creation during migration respect SEARCH_INDEX (#689)
* Make the search index creation during migration respect SEARCH_INDEX

* Make the search subcommand respect it too
5 years ago
fdb-hiroshima 006b44f580 Add support for generic timeline (#525)
* Begin adding support for timeline

* fix some bugs with parser

* fmt

* add error reporting for parser

* add tests for timeline query parser

* add rejection tests for parse

* begin adding support for lists

also run migration before compiling, so schema.rs is up to date

* add sqlite migration

* end adding lists

still miss tests and query integration

* cargo fmt

* try to add some tests

* Add some constraint to db, and fix list test

and refactor other tests to use begin_transaction

* add more tests for lists

* add support for lists in query executor

* add keywords for including/excluding boosts and likes

* cargo fmt

* add function to list lists used by query

will make it easier to warn users when creating timeline with unknown lists

* add lang support

* add timeline creation error message when using unexisting lists

* Update .po files

* WIP: interface for timelines

* don't use diesel for migrations

not sure how it passed the ci on the other branch

* add some tests for timeline

add an int representing the order of timelines (first one will be on
top, second just under...)
use first() instead of limit(1).get().into_iter().nth(0)
remove migrations from build artifacts as they are now compiled in

* cargo fmt

* remove timeline order

* fix tests

* add tests for timeline creation failure

* cargo fmt

* add tests for timelines

* add test for matching direct lists and keywords

* add test for language filtering

* Add a more complex test for Timeline::matches, and fix TQ::matches for TQ::Or

* Make the main crate compile + FMT

* Use the new timeline system

- Replace the old "feed" system with timelines
- Display all timelines someone can access on their home page (either their personal ones, or instance timelines)
- Remove functions that were used to get user/local/federated feed
- Add new posts to timelines
- Create a default timeline called "My feed" for everyone, and "Local feed"/"Federated feed" with timelines

@fdb-hiroshima I don't know if that's how you pictured it? If you imagined it differently I can of course make changes.

I hope I didn't forgot anything…

* Cargo fmt

* Try to fix the migration

* Fix tests

* Fix the test (for real this time ?)

* Fix the tests ? + fmt

* Use Kind::Like and Kind::Reshare when needed

* Forgot to run cargo fmt once again

* revert translations

* fix reviewed stuff

* reduce code duplication by macros

* cargo fmt
5 years ago
Ana Gelez 309e1200d0 Make a distinction between moderators and admins (#619)
* Make a distinction between moderators and admins

And rework the user list in the moderation interface, to be able to run the same action on many users,
and to have a huge list of actions whithout loosing space.

* Make user's role an enum + make it impossible for a moderator to escalate privileges

With the help of diesel-derive-enum (maybe it could be used in other places too?)

Also, moderators are still able to grant or revoke moderation rights to other people, but maybe only admins should be able to do it?

* Cargo fmt

* copy/pasting is bad

* Remove diesel-derive-enum and use an integer instead

It was not compatible with both Postgres and SQlite, because for one it generated a schema
with the "User_role" type, but for the other it was "Text"…

* Reset translations

* Use an enum to avoid magic numbers + fix the tests

* Reset translations

* Fix down.sql
5 years ago
Ana Gelez a6c84daa1a
Theming (#624)
* Theming

- Custom CSS for blogs
- Custom themes for instance
- New dark theme
- UI to choose your instance theme
- Option to disable blog themes if you prefer to only have the instance theme
- UI to choose a blog theme
5 years ago
Rob Watson 4b205fa995 Store password reset requests in database (#610)
* Store password reset requests in database

Signed-off-by: Rob Watson <rfwatson@users.noreply.github.com>

* Refactor password reset request expiry handling

* Integrate sqlite

* Fix formatting
5 years ago
fdb-hiroshima 49bb8cb0bc
import migrations and don't require diesel_cli for admins (#555)
* import migrations via macro

* panic on database not to the latest migration

* add subcommand to plm

* create migration that run tantivy index creation

* remove diesel_cli from places it was

* use our migration system for tests

* create table __diesel_schema_migrations if needed
5 years ago
Valentin Brandl f0d6b9d1e8 Fix issue with sqlite migrations for comment_seers (#503) 5 years ago
Baptiste Gelez bdfad844d7
Edit blogs, and add blog icons and banners (#460)
Also adds a parameter to `md_to_html` to only render inline elements (so that we don't have titles or images in blog descriptions). And moves the delete button for the blog on the edition page.

I still have to update the SQLite migration once others PRs with migrations will be merged.

Also, there will be a problem when you edit a blog while not owning its banner or icon: when validating they will be reset to their default values… I don't see a good solution to this until we have a better way to handle uploads with Rocket (the same is probably happening for articles btw).

And the icon/banner are not federated yet, I don't know if I should add it to this PR or if it can come after?

![image](https://user-images.githubusercontent.com/16254623/53894510-7d853300-4030-11e9-8a2c-f5c0b0c7f512.png)
![image](https://user-images.githubusercontent.com/16254623/53894539-8b3ab880-4030-11e9-8113-685a27be8d7c.png)

Fixes #453
Fixes #454
5 years ago
fdb-hiroshima 570d7fe2d0
Add markdown support for summary (#482)
* Add markdown support for summary

* Save both md and html summary
5 years ago
Baptiste Gelez fe6e69d7c4
Add a fqn field to blogs and users (#457)
Fixes #319
5 years ago
fdb-hiroshima aa72334dc6
Allow for media cover deletion (#387)
* Allow for media cover deletion

Fix #356

* Fix sqlite migrations
6 years ago
fdb-hiroshima fdfeeed6d9 Comment visibility (#364)
Add some support for comment visibility, fix #217 

This add a new column to comment, denoting if they are public or not, and a new table linking private comments to those allowed to read them. There is currently no way to write a private comment from Plume.
Git is having a hard time what happened in Comment::from_activity, but most of it is just re-indentation because a new block was needed to please the borrow checker. I've marked with comments where things actually changed.
At this point only mentioned users can see private comments, even when posted as "follower only" or equivalent.

What should we do when someone isn't allowed to see a comment? Hide the whole thread, or just the comment? If hiding just the comment, should we mark there is a comment one can't see, but answers they can, or put other comments like if they answered to the same comment the hidden one do?
6 years ago
fdb-hiroshima ce08346487
Remove ap_url from mention (#362) 6 years ago
Baptiste Gelez 61b6ceed92
Add some constraint at database level (#342)
* Add some constraint at database level

Fixes #79 and should fix #201 and #113 as well

* Fix tests

Delete duplicated data before adding constraints (only with Postgres, there is no way to do it with Sqlite with complex constraints like the one we are using)

Remove the constraint on media path

* We don't need to drop the media unique constraint anymore

Because we deleted it
6 years ago
Baptiste Gelez ab5edbc6a5 Add a cover field to posts
Referencing the media to use to illustrate the article
6 years ago
Baptiste Gelez 2394ff424b Add an ApiToken model, and an endpoint to get one 6 years ago
Baptiste Gelez 4c8a727e9e Add a model for external apps
Stores their name, website, and credentials
6 years ago
Trinity Pointard 95ea248518 Add support for hashtag on user interface
Add migration to fix typo
Add support for linking hashtags with posts
Rework tag search page so it says a nicer message than page not found
when no post use that tag
Add new string to translation
6 years ago
Bat 387efbf3e9 Change default license to CC-BY-SA
Fixes #258
6 years ago
Bat 38d737ed0c
Introduce features to choose between SQlite or Postgres 6 years ago
Igor Galić 88456faf84
align types between sqlite & postgres
this one's achieved by adding "NOT NULL" at the *correct* position in
SQLite's create tables.
6 years ago
Igor Galić b28bef20a7
align types between sqlite & postgres
use DATETIME for SQLite's time type. This way, Diesel picks up on what
it's supposed to be.
6 years ago
Igor Galić 1f8680c4c5
add sqlite migrations
we move our PostgreSQL specific migrations to a subdirectory.
The SQLite migrations have been created by running `diesel` against a
copy, and then fixing what's broken.
In the end i reduced all modifications to a single create, since we
*are* starting out fresh with SQLite.

n.b.: i'm not entirely happy with the results yet, because diesel
heavily modifies our `plume-models/src/schema.rs`.
I'll keep fiddling until we have the same types between the two
databases.
6 years ago
Bat a7b34173dd Don't delete account with avatar
Fixes #200
6 years ago
Bat 7152d714ae Add a source property to posts
To store the Markdown
6 years ago
Bat 2b7a5bee93 Add a tag model 6 years ago
Bat 94a386ea2c Add subtitles to articles
Fix #152
6 years ago
Bat dcebc4653a Make it possible to unfollow someone
I was sure it was already implemented, but it looks like it wasn't
6 years ago
Bat 32a4949f25 Update user information if needed
When a remote is displayed, if it has not been updated since at least 24 hours, newer informations are fetched.

Fixes #135
6 years ago
Bat aa5fa11218 Add support for avatars, and fetch remote ones 6 years ago
Bat f44b6fffa3 Media upload 6 years ago
Bat 0b5eb2c946 Add a Media model 6 years ago
Bat ed8982b7fd Add a presentation of Plume and of the instance on the homepage
Fixes #132
6 years ago
Bat 74ec59e77c Add some configuration options for instance admins 6 years ago
Bat 38d99ad5af Try to fetch followers 6 years ago
Bat c87d490664 Refactor notifications 6 years ago
Bat 291e20cb94 Remove a "l" lost in a migration file 6 years ago
Bat 153400959c Actually validate forms 6 years ago
Bat c4cc4a4e13 Notify when receiving a mention 6 years ago
Bat e074af57ff Add a Mention model 6 years ago
Bat ae4bcabc53 Make notifications translatable 6 years ago
Bat a0b4a6eacb Order notifications by creation date 6 years ago
Bat 045e885821 Add a Reshare model 6 years ago
Bat 9c9799eee2 Add support for shared inboxes for users 6 years ago
Bat 780a51157f Add a notification model 6 years ago
Bat 601fe7cf4f Allow likes to be deleted with AP 6 years ago
Bat 7b5f0f1704 Add a model for likes 6 years ago