Commit Graph

116 Commits

Author SHA1 Message Date
Kitaiti Makoto
249fbbe891 Remove unused import 2022-04-18 00:11:12 +09:00
Kitaiti Makoto
3db10a09bb Use OneOrMany<&AnyString>::to_as_string() 2022-04-18 00:11:12 +09:00
Kitaiti Makoto
e407d58ee9 Implement FromId07 for User 2022-04-18 00:11:12 +09:00
Kitaiti Makoto
f3b67ab6c9 WIP 2022-04-18 00:11:12 +09:00
Kitaiti Makoto
34c374de1a Attach icon field to User activity only whene it has avatar 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
113722e4ba Add more ActivityPub tests for User 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
3b429909f1 Extract User::outbox_collection_page() from outbox_collection() for testablity 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
f1cdf4552f Extract User::outbox_collection() from outbox() for testablity 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
e1a598a459 Attach avater to sample user 2022-02-05 17:58:00 +09:00
Kitaiti Makoto
a65775d85b Implement EmailSignup 2022-01-05 03:17:58 +09:00
Kitaiti Makoto
e01539ef16 Follow Clippy 2021-12-05 20:24:11 +09:00
Kitaiti Makoto
5651e11ba1 Add FIXME comment 2021-12-05 20:22:10 +09:00
Kitaiti Makoto
d98132db80 Don't log unnecessary error 2021-12-05 19:32:27 +09:00
Kitaiti Makoto
25fe2ad802 Use request::get() instead of ClientBuilder 2021-12-05 19:32:27 +09:00
Kitaiti Makoto
f4d7dfb261 Sign GET request to other instances 2021-12-05 19:32:27 +09:00
Kitaiti Makoto
858806149a Use concrete Error for Signer 2021-12-05 19:32:27 +09:00
Kitaiti Makoto
94cc260803 Add Instance to users::Role 2021-12-05 19:32:27 +09:00
Kitaiti Makoto
ae3344f318 Follow Rust and crates update 2021-11-28 08:06:29 +09:00
Kitaiti Makoto
8e50d95a7a Fix code according to clippy 2021-03-28 03:46:37 +09:00
Kitaiti Makoto
b2e7664339 Extract User::acct_authority() method 2021-02-14 22:14:44 +09:00
Kitaiti Makoto
6401cb6fb7 Define User::remote_user_found() and publish_remote_user_found() 2021-02-01 00:48:22 +09:00
Kitaiti Makoto
3b766fc427 Define UserEvent 2021-01-31 22:55:28 +09:00
Kitaiti Makoto
78be49d57d Make tests follow API changes 2021-01-31 21:58:44 +09:00
Kitaiti Makoto
25e52788c5 Replace PlumeRocket with DbConn where possible 2021-01-31 21:58:09 +09:00
Kitaiti Makoto
6c1dd6608d Add test for search actor 2021-01-16 16:39:12 +09:00
Kitaiti Makoto
47e67d9b64 Add methods to clear data of instances and users table for testing 2021-01-16 16:39:12 +09:00
Kitaiti Makoto
1d042e1bb2 Add methods to clear data of instances and users table for testing 2021-01-16 16:39:12 +09:00
Kitaiti Makoto
a0cd9dd6bd Fix tests to follow API changes 2021-01-16 16:39:12 +09:00
Kitaiti Makoto
fc8ee1c3bc Remove searcher from arguments of Post::delete() and dependented methods 2021-01-16 16:38:18 +09:00
Kitaiti Makoto
012c8d2026 Remove redundant imports 2021-01-15 22:35:19 +09:00
Aiden McClelland
24aac22b89
proxy support 2021-01-11 13:27:52 -07:00
Trinity Pointard
3de009713d try fixing clippy and fmt 2020-10-08 20:24:03 +02:00
Trinity Pointard
69bcb01715 fix test following ldap udpate 2020-10-08 19:59:54 +02:00
Trinity Pointard
4da9b24cb1 cargo fmt 2020-10-07 23:40:27 +02:00
Trinity Pointard
f40634aa97 address comments 2020-10-07 23:39:38 +02:00
Trinity Pointard
8975b0f9e9 cargo fmt 2020-10-04 12:18:54 +02:00
Trinity Pointard
d626f3366d add support for ldap 2020-10-04 12:18:22 +02:00
Trinity Pointard
b24f195e10 refactor login
first step toward ldap
should have no functionnal change
2020-10-03 13:21:31 +02:00
KITAITI Makoto
92a386277b
Switchable tokenizer (#776)
* [REFACTORING]Rename whitespace_tokenizer to tag_tokenizer for
registration

Name representing its purpose is preferred.

* Add lindera-tantivy to plume-model's dependencies

* Install lindera-tantivy

* Add SearchTokenizerConfig struct

* Add search tokenizers to config option

* Use CONFIG for tokenizers

* Use enum to hold tokenizer config instead of initializing on config phase

* Use guard instead of duplicate default values

* Use as_deref() instead of guard

* Move SearchTokenizer from plume-models to plume-models::search::tokenizer

* Rename SearchTokenizer to TokenizerKind

* Define SearchTokenierConfig::determine_tokenizer()

* Use determine_tokenizer in SearchTokenizerConfig::init()

* Pass tokenizer config to Searcher methods

* Add LowerCase filter to Lindera tokenizer

* Add test for Lindera tokenizer

* Define SEARCH_LANG env to specify tokenizers set

* Run cargo fmt

* Make Lindera tokenizer optional

* Fix typos
2020-06-17 16:57:28 +02:00
KITAITI Makoto
73aa301d4a
Fix user subscription URI so that plume::routes:interact accept it (#762) 2020-05-02 12:07:45 +02:00
KITAITI Makoto
b834d1c282
Fix #701 Preferable default theme (#746)
* Make it possible to update users.preferred_theme to NULL

* Make preferred them null when 'Default theme' is selected

* Run cargo fmt
2020-04-12 17:36:00 +02:00
Ana Gelez
5f8d6b8e0e Rust 2018! (#726) 2020-01-21 07:02:03 +01:00
fdb-hiroshima
3663bffe5c Update compiler (#725)
* update compiler to recent nightly

* cargo fmt

* fix clippy

but ructe code is still complaining

* update circleci and rocket_csrf

* fix last clippy problems

* cargo fmt

* fix build issue

was caused be improper handling of recursive template (comment) by old ructe, which is fixed on newer version
2020-01-19 12:52:32 +01:00
Violet White
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'
2020-01-12 19:41:35 +01:00
Violet White
52d860d402 Paginate the outbox responses. Fixes #669 (#681)
* Paginate the outbox responses. Fixes #669

* Address Ana's review

* Make outbox_fetch page through instance outboxes

* Fix infinite loop in fetch_outbox

* Fix off by one
2019-10-30 11:22:28 +01:00
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
2019-10-07 19:08:20 +02:00
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
2019-09-13 12:28:36 +02:00
fdb-hiroshima
12c80f9981 delete notification on user deletion (#658)
* delete notification on user deletion

fix #651

* use the correct id for deletion

* add regression test

* push helpers too

* revert CI changes
2019-09-13 11:29:52 +02:00
fdb-hiroshima
ddbec3f204 fill entirely user on creation (#657)
fix #635
2019-08-27 22:28:40 +02:00
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
2019-08-21 00:42:04 +02:00