* Use multi step build to limit the image size
This change replace the Dockerfile with a multi step build to avoid huge image
size (the new image should be around 130Mo including all layers), compared to
more that 1Go with the full build chain. It's also more safe. This image does
not include cargo (not needed in production), so the old Dockerfile is available
and renamed Dockerfile.slim for those who use Docker for development setup.
* Use correct path for local repository
* Use sleep between chmod and execution
This change also remote all units for line-height to have more consistent styles and better cascading support. This solve the too small line height for multi line header in article and also add styling for h1 to h6 (previously h3 to h6 was not styled at all)
* Update plume-front build to use a shell script that adds the necessary dependencies on arm (x86 left untouched inside the script)
* Fix cleanup portion of plume-front.sh
* Break wasm dependencies for arm out so they are run before the main builds to improve layer caching on subsequent docker builds
* Fixup dockerfile so wasm-deps can run properly and with fewer assumptions
* Move new scripts to script/ folder
* Remove saving of path as it's not actually not necessary
* Add rust-toolchain to early copy so it pulls the right rust release (addresses #400)
- Use `Result` as much as possible
- Display errors instead of panicking
TODO (maybe in another PR? this one is already quite big):
- Find a way to merge Ructe/ErrorPage types, so that we can have routes returning `Result<X, ErrorPage>` instead of panicking when we have an `Error`
- Display more details about the error, to make it easier to debug
(sorry, this isn't going to be fun to review, the diff is huge, but it is always the same changes)
Rust can compile to WASM, so let's use it for front-end code as well.
To compile the front-end:
```
cargo install cargo-web
cargo web deploy -p plume-front
```
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?
* Fix some follow issues
Fix not receiving notifications when followed by remote users
Fix imposibility to be unfollowed by Mastodon/Pleroma users (tested only against Pleroma)
* Fix notification on every post
* Fix issues with federation
Send Link instead of Object when emiting Follow request
Receive both Link and Object for Follow request
Don't panic when fetching user with no followers or posts from Pleroma
Reorder follower routes so Activity Pub one is reachable
* Generate absolute urls for mentions and tags
* Verify author when undoing activity by Link
* Remove use of String for body parameters
Create SignedJson and implement FromData for it
* Make Travis test on release
* Remove warning when installing and fix coverage
* Count items in database as much as possible
* Fix the tests
* Remove two useless queries
* Run pragma directive before each sqlite connection
* Pragma for tests too
* Remove debug messages
* 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