Commit Graph

1100 Commits (3d8785e97bbef36983e9dabe19e774dda04ffc98)
 

Author SHA1 Message Date
Mina Galić 3d8785e97b
add rocket_contrib as dependency
use rocket_contrib's `#[database]` to implement our `DbConn`
4 years ago
kiwii 6de9a1f1c8 Merge pull request 'Recreate search index if its format is outdated' (#802) from KitaitiMakoto/Plume:invalid-index into main
Reviewed-on: #802
Reviewed-by: Mina Galić <me+git@igalic.co>
4 years ago
Kitaiti Makoto 5e30bede40 Don't care about needless return value of closures 4 years ago
Kitaiti Makoto 5cca66b346 Add action user can take to error message 4 years ago
Kitaiti Makoto 484659fde2 Run cargo fmt 4 years ago
Kitaiti Makoto 5fc827c1c9 Re-initialize search index when recreating is failed 4 years ago
Kitaiti Makoto 50753b3a65 Recreate search index if its format is outdated 4 years ago
Kitaiti Makoto c5d03d300b Cause IndexInvalidDataError when search index is invalid 4 years ago
kiwii 010eac6c4a Merge pull request 'upgrade rocket* to the latest stable' (#800) from igalic/Plume:update/rocket into main
Reviewed-on: #800
Reviewed-by: kiwii <kiwii@noreply@joinplu.me>
4 years ago
Mina Galić a107d35492
upgrade rocket* to the latest stable
before we embark on upgrading to async, and all the refactoring that
this will bring on us (see #797 & #799), we should keep our `main`
branch as stable and current as possible.
Let's start by upgrading rocket and its dependencies.
4 years ago
Kitaiti Makoto f9beb2383b Update lindera-tantivy to v0.1.3 4 years ago
Chosto 7e78cffcaa
Bump Docker base images to buster flavor (#797) 4 years ago
TheMasix 28576c1fa3
Add Vazir Font (#787)
* Add Vazir Font

* Add Vazir Font License

* fix prettier problem

* Shabnam added
4 years ago
Gelez d99b42582d
Add Persian to the list of languages (#782) 4 years ago
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
4 years ago
Gelez 297d9fcf40
Don't show boosts and likes for "all" and "local" in timelines (#781)
Fixes #711
4 years ago
KITAITI Makoto ef70cb93e6
Upgrade Tantivy to v0.12.0 (#771)
* Upgrade Tantivy to 0.12.0

* Follow Tantivy Tokenizer's new type definition

* Wrap tokenizers with TextAnalyzer to use filter methods

* Replace async IndexWriter::garbage_collect_files with sync functions

* Update Cargo.toml
4 years ago
Daniel Watkins efb76a3c17
remove dependency on runtime-fmt (#773)
Per the issue, "runtime-fmt uses perma-unstable rust APIs and is
therefore susceptible to breakage".

This replaces the two calls to rt_format! with .replace() and drops the
dependency.

Fixes #769
4 years ago
KITAITI Makoto 197f0d7ecd
Add test for hash including ZWSP (#772)
* Add test for hash including ZWSP

* Run cargo fmt
4 years ago
KITAITI Makoto 3be842c653
Make database connections configurable by environment variables (#768)
* Make env DB_MAX_SIZE and DB_MIN_IDLE recognizable

* Make database max size and minimum idle configurable

* Restore file permission

* Fail fast
4 years ago
KITAITI Makoto dabe904642
Escape expressions in @Html (#767) 4 years ago
KITAITI Makoto 180e34b07c
Fix Atom feed datetime format (#766) 4 years ago
KITAITI Makoto 847d6f7fac
Fix Atom feed (#764)
* Percent-encode URI segments in ap_url

* Fix invalid Atoms

* Remove redundant clone according to cargo clippy

* Revert "Percent-encode URI segments in ap_url"

This reverts commit 8253aa79bd.
ActivityPub(JSON-LD) accepts URI.
See https://github.com/Plume-org/Plume/pull/764#issuecomment-623105734

* Use absolute IRI for IDs in Atom

* Reuse formatted string

* Use parent element's creation date for Atom updated if there's no post

* Remove uncecessary UTC conversion

* Extract routes::build_atom_feed function
4 years ago
KITAITI Makoto 6a3f210dfc
Keep atmarks and hashes in link (#765)
* [REFACTORING]Use DocumentContext during parsing Markdown

* Add test case for hash in link

* Make DocumentContext derive Debug

* Add in_link field in DocumentContext

* Don't make hash words tags in link

* Add test for atmark in link

* Don't make atmark words in link mentions
4 years ago
KITAITI Makoto 73aa301d4a
Fix user subscription URI so that plume::routes:interact accept it (#762) 4 years ago
KITAITI Makoto b3d367b174
Use plural form for 0 in French (#760)
See https://github.com/Plume-org/Plume/issues/745
4 years ago
KITAITI Makoto edaccd1a31
Fixes #757 Allow Unicode hashtags (#758)
* Add test for Persian language hashtags

See https://github.com/Plume-org/Plume/issues/757

* Add regex-syntax with unicode-perl feature to dependencies

* Install regex-syntax

* Allow hashtag to use Unicode word characters

* Run cargo fmt
4 years ago
Floréal Toumikian e1bd2eab75
Updated: Cargo.lock (#753) 4 years ago
KITAITI Makoto ac7a05b09a
Make blocklist deletion possible (#750) 4 years ago
KITAITI Makoto 71e0a35e06
Use LenientForm instead Form for CSRF protected pages (#751) 4 years ago
KITAITI Makoto c217e5e9b3
Move stylesheets for header from _global.sccss to _header.scss (#749) 4 years ago
KITAITI Makoto 8ba0c17db5
Build app and po files before upload pos to Crowdin (#748) 4 years ago
Floréal Toumikian 4e43c676b4
Fixed: #713: Disply likes and boosts on post cards (#744)
This is a basic and simple way to display them. No interaction possible.

Alos, this patch is not optimised. as everytime a partial post_card is
called, `Post::count_likes()` and `Post::count_reshares()` are called
which means quite a few more quesies are sent to database unless diesel
uses some cache mechanisem.

A way to enhance this this would be to keep a count of likes and reshares
are kept in Post model / table.
4 years ago
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
4 years ago
Kenneth Steimel 506fe9955d
Fixed #734 , passowrds are now hidden on the remote_interact pages (#741)
* Fixed #734 , passowrds are now hidden on the remote_interact pages

* Update templates/remote_interact_base.rs.html

Co-Authored-By: Floréal Toumikian <floreal+github@nimukaito.net>

Co-authored-by: Floréal Toumikian <floreal+github@nimukaito.net>
4 years ago
KemoNine 02c528cae4
Bump llvm -> 9.0.0 (fixes arm builds) (#737) 4 years ago
Christopher James Halse Rogers 2a58835f92
Snapcraft updates (#731)
* snap: Update rust compiler

* snap: Fix the build.

We now need libclang

* snap: Fix the non-x86 builds.

The goddamned environment variable is SNAPCRAFT_ARCH_TRIPLE*T*

* snap: Mark as stable.

The snap works fine; we don't need to warn people away
4 years ago
Ana Gelez 5f8d6b8e0e Rust 2018! (#726) 4 years ago
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
4 years ago
KemoNine 72464fb428 Add missing dep on clang needed for crate builds (#724) 4 years ago
Wilfried OLLIVIER 23049b638c WIP: Fix RSS issues (#720)
* Add id field to RSS feed

* Add published field to RSS feed
4 years ago
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
Violet Myers e6bdeb7c4b Fix #699 (#719) 4 years ago
Violet Myers 458baf5f78 Syntax highlighting (#691)
* Syntax highlighting mostly... Exists.

* Add dependency to dockerfile

* Handle non-existent languages better

* Make the default a bit nicer

* Improve highlighting. Clean up function

* Add dark theme, add the comment scope to the allowed classes

* update build env

* Address review comments

* Use find_syntax_by_token which produces the desired behavior

* Change flat_map into flatten
(commit cargo.lock)
4 years ago
Ana Gelez 597778fd2f release Alpha 4 (#709)
* Update version numbers

* Update translations again

* Translations?

* This time translations should be here
4 years ago
Violet Myers e53574970c Fix issue #705 (#708)
* Fix issue #705

* Add canonical links to blogs too
4 years ago
Marek Ľach 9ede06e7a3 Make the comment syntax consistent across all CSS (#707)
* Update _article.scss

* Update _dark_variables.scss

* Update _forms.scss

* Update _global.scss

* Update _header.scss

* Update _variables.scss
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
4 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
4 years ago
Wilfried OLLIVIER 3bd2305115 Fix #637 : Markdown footnotes (#700)
* Ensure footnotes classes generated are not filtered

pulldown-cmark add somes classes when footnotes html is generated. This commit ensure they are not filtered by html sanitizer

* Add some footnotes styling
4 years ago