Commit graph

463 commits

Author SHA1 Message Date
ThibG
6c4a196b53 Fix sanitizing lists contents ()
* Add test

* Fix code for sanitizing nested lists stripping all tags
2019-08-09 21:33:18 +02:00
Eugen Rochko
212848b66e Change language detection to include hashtags as words () 2019-08-09 21:33:18 +02:00
ThibG
7f9431c306 Play animated custom emoji on hover ()
* Play animated custom emoji on hover in status

* Play animated custom emoji on hover in display names

* Play animated custom emoji on hover in bios/bio fields

* Add support for animation on hover on public pages emojis too

* Fix tests

* Code style cleanup
2019-08-06 21:53:21 +02:00
ThibG
6e28da2139 Apply filters to poll options ()
* Apply filters to poll options in WebUI

Fixes 

* Apply filters to poll options server-side

* Add poll options to searchable text
2019-08-06 21:52:00 +02:00
Eugen Rochko
74982c71b0 Fix delete regression ()
Regression from ff789a751a
2019-08-06 21:51:29 +02:00
ThibG
c83c87fbe2 Fix boosting & unboosting preventing a boost from appearing in the TL ()
* Fix boosting & unboosting preventing a boost from appearing in the TL

* Add tests

* Avoids side effects when aggregate_reblogs isn't true
2019-08-06 21:51:29 +02:00
Eugen Rochko
769bbd511f Fix statsd UDP sockets not being cleaned up in Sidekiq () 2019-08-06 21:50:45 +02:00
Eugen Rochko
aa9b37822b
Fix audio not being downloaded from remote servers () 2019-06-22 02:50:36 +02:00
Eugen Rochko
707ddf7808
Change domain blocks to automatically support subdomains ()
* Change domain blocks to automatically support subdomains

If a more authoritative domain is blocked (example.com), then the
same block will be applied to a subdomain (foo.example.com)

* Match subdomains of existing accounts when blocking/unblocking domains

* Improve code style
2019-06-22 00:13:10 +02:00
Eugen Rochko
103a9f4466
Fix sanitizer making block level elements unreadable ()
Fix 
2019-06-16 21:46:36 +02:00
Eugen Rochko
8746f4d17b
Change priority of delete activity forwards for replies and reblogs ()
Fix 
2019-06-09 12:47:33 +02:00
ThibG
6c464cd424 Do not misattribute inlined boosts if attributedTo isn't present ()
* Do not misattribute inlined boosts if `attributedTo` isn't present

Fixes 

* Fix tests
2019-06-04 23:24:31 +02:00
Eugen Rochko
f2b743e715
Refactor all ActivityPub deliveries to be serialized and signed through one concern () 2019-06-04 23:11:18 +02:00
ThibG
3a84bacf86 Handle blank poll options more gracefully ()
Pleroma currently allows (erroneously imho) empty poll options, that is,
options with an empty (but existing) `name`.
2019-06-03 20:04:00 +02:00
Eugen Rochko
1e5532e693
Add responsive panels to the single-column layout ()
* Add responsive panels to the single-column layout

* Fixes

* Fix not being able to save the preference

* Fix code style issues

* Set max-height on the compose textarea and add a link to relationship manager
2019-05-25 21:27:00 +02:00
ThibG
9a5561a5b8 Fix possible race condition when processing statuses () 2019-05-23 20:00:39 +02:00
ThibG
c1c8c7b2c8 Minor performance improvements and cleanup in formatter () 2019-05-15 06:54:06 +02:00
ThibG
62f5235b6f Prevent silenced local users from notifying remote users not following them ()
* Prevent silenced local users from notifying remote users not following them

This is an attempt to extend the local restrictions of silenced users to the
federation.

* Add tests

* Add tests for making sure private status don't get sent over OStatus
2019-05-09 22:05:43 +02:00
Eugen Rochko
fba96c808d
Add blurhash ()
* Add blurhash

* Use fallback color for spoiler when blurhash missing

* Federate the blurhash and accept it as long as it's at most 5x5

* Display unknown media attachments as blurhash placeholders

* Improve style of embed actions and spoiler button

* Change blurhash resolution from 3x3 to 4x4

* Improve dependency definitions

* Fix code style issues
2019-04-27 03:24:09 +02:00
Ben Lubar
be8692b938 Default to the web domain (eg. mastodon.lubar.me) instead of the local domain (eg. lubar.me) for keybase proofs () 2019-04-21 04:53:24 +02:00
Eugen Rochko
a9f130b8d8
Fix Keybase verification using wrong domain for remote accounts () 2019-04-10 20:28:43 +02:00
Takeshi Umeda
a4d5e15327 Fix config serializer regex () 2019-04-08 07:55:38 +02:00
Eugen Rochko
1714ea5978
Add ActivityPub representation for identity proofs ()
* Add ActivityPub representation for identity proofs

* Add tests
2019-03-30 02:12:06 +01:00
Alex Gessner
69141dca26 squashed identity proof updates () 2019-03-28 18:01:09 +01:00
Eugen Rochko
f1bc90ab50
Rename :poll to :preloadable_poll and :owned_poll to :poll on Status ()
Also, fix some n+1 queries

Resolve 
2019-03-28 04:44:59 +01:00
Eugen Rochko
e86663b1da
Fix alternative relay support regression ()
Fix 
2019-03-27 19:58:24 +01:00
Eugen Rochko
11fe293e1b
Remove unused ActivityPub @context values depending on response ()
Fix 
2019-03-27 15:55:23 +01:00
Eugen Rochko
e6cfa7ab89
Change language detector threshold from 140 characters to 4 words ()
Add `lang` attribute to statuses in web UI
2019-03-26 01:23:59 +01:00
Eugen Rochko
3411fbef19
Improve config serializer for Keybase ()
- Regex must no longer be surrounded by `/`
- Description must be short and cannot contain HTML tags
2019-03-21 23:33:28 +01:00
ThibG
80f0910e21 Add support for custom emojis in poll options ()
* Backend changes for custom emoji support in poll options

* Serialize poll emojis in REST API

* Render custom emojis in poll options

* Render custom emoji in poll options on public pages
2019-03-20 17:29:12 +01:00
Eugen Rochko
9c4cbdbafb
Add Keybase integration ()
* create account_identity_proofs table

* add endpoint for keybase to check local proofs

* add async task to update validity and liveness of proofs from keybase

* first pass keybase proof CRUD

* second pass keybase proof creation

* clean up proof list and add badges

* add avatar url to keybase api

* Always highlight the “Identity Proofs” navigation item when interacting with proofs.

* Update translations.

* Add profile URL.

* Reorder proofs.

* Add proofs to bio.

* Update settings/identity_proofs front-end.

* Use `link_to`.

* Only encode query params if they exist.

URLs without params had a trailing `?`.

* Only show live proofs.

* change valid to active in proof list and update liveness before displaying

* minor fixes

* add keybase config at well-known path

* extremely naive feature flagging off the identity proof UI

* fixes for rubocop

* make identity proofs page resilient to potential keybase issues

* normalize i18n

* tweaks for brakeman

* remove two unused translations

* cleanup and add more localizations

* make keybase_contacts an admin setting

* fix ExternalProofService my_domain

* use Addressable::URI in identity proofs

* use active model serializer for keybase proof config

* more cleanup of keybase proof config

* rename proof is_valid and is_live to proof_valid and proof_live

* cleanup

* assorted tweaks for more robust communication with keybase

* Clean up

* Small fixes

* Display verified identity identically to verified links

* Clean up unused CSS

* Add caching for Keybase avatar URLs

* Remove keybase_contacts setting
2019-03-18 21:00:55 +01:00
ThibG
a20354a20b Set and store report URIs ()
Fixes 
2019-03-17 15:34:56 +01:00
Eugen Rochko
1b167707c2
Fix language detection of non-latin alphabets even at few characters () 2019-03-15 05:07:09 +01:00
Eugen Rochko
9f5b55ad4f
Fix poll update handler calling method was that was not available ()
* Fix poll update handler calling method was that was not available

Fix regression from 

* Refactor VoteService

* Refactor ActivityPub::DistributePollUpdateWorker and optimize it

* Fix typo

* Fix typo
2019-03-12 22:58:59 +01:00
ThibG
79b00d294d Increase DNS timeouts () 2019-03-11 13:27:57 +01:00
ThibG
3a92885a86 Support pushing and receiving updates to poll tallies ()
* Process incoming poll tallies update

* Send Update on poll vote

* Do not send Updates for a poll more often than once every 3 minutes

* Include voters in people to notify of results update

* Schedule closing poll worker on poll creation

* Add new notification type for ending polls

* Add front-end support for ended poll notifications

* Fix UpdatePollSerializer

* Fix Updates not being triggered by local votes

* Fix tests failure

* Fix web push notifications for closing polls

* Minor cleanup

* Notify voters of both remote and local polls when those close

* Fix delivery of poll updates to mentioned accounts and voters
2019-03-11 00:49:31 +01:00
ThibG
3aaac4f134 Do not allow adding votes to expired polls ()
* Do not allow adding votes to expired polls

* Only validate expires_at on create
2019-03-08 00:54:50 +01:00
ThibG
34f261e6af Avoid unnecessarily fetching the replies collection when it is empty () 2019-03-07 01:50:37 +01:00
ThibG
efd0fb8088 Fix newlines in OStatus and RSS serializations () 2019-03-05 23:58:58 +01:00
ThibG
636db1f54f When serializing polls over OStatus, serialize poll options to text ()
* When serializing polls over OStatus, serialize poll options to text

* Do the same for RSS feeds

* Use “[ ] ” as a prefix for poll options instead of “- ”
2019-03-05 21:09:18 +01:00
ThibG
833ffce2df Store remote votes URI ()
* Store remote votes URI

* Add spec for accepting remote votes

* Make poll vote id generation work the same way as follows
2019-03-04 22:51:23 +01:00
Eugen Rochko
0e6998da3c
Add tests for ActivityPub poll processing () 2019-03-04 01:13:42 +01:00
Eugen Rochko
ae1b9cf70a
Fix remote poll expiration time () 2019-03-04 00:44:34 +01:00
Eugen Rochko
230a012f00
Add polls ()
* Add polls

Fix 

* Add tests

* Fixes

* Change API for creating polls

* Use name instead of content for votes

* Remove poll validation for remote polls

* Add polls to public pages

* When updating the poll, update options just in case they were changed

* Fix public pages showing both poll and other media
2019-03-03 22:18:23 +01:00
ThibG
d8498b3983 Give the replies collection an identifier and enable pagination () 2019-02-28 18:16:34 +01:00
ThibG
9d3c6f1849 Improved remote thread fetching ()
* Fetch up to 5 replies when discovering a new remote status

This is used for resolving threads downwards. The originating
server must add a “replies” attributes with such replies for it to
be useful.

* Add some tests for ActivityPub::FetchRepliesWorker

* Add specs for ActivityPub::FetchRepliesService

* Serialize up to 5 public self-replies for ActivityPub notes

* Add specs for ActivityPub::NoteSerializer

* Move exponential backoff logic to a worker concern

* Fetch first page of paginated collections when fetching thread replies

* Add specs for paginated collections in replies

* Move Note replies serialization to a first CollectionPage

The collection isn't actually paginable yet as it has no id nor
a `next` field. This may come in another PR.

* Use pluck(:uri) instead of map(&:uri) to improve performances

* Fix fetching replies when they are in a CollectionPage
2019-02-28 15:22:21 +01:00
ThibG
9edab46368 Fix mention processing for unknwon accounts on incoming ActivityPub Notes ()
`::FetchRemoteAccountService` is not `ActivityPub::FetchRemoteAccountService`,
its second argument is the pre-fetched body. Passing `id: false` actually passed
a `Hash` as the prefetched body, instead of properly resolving unknown remote
accounts.
2019-02-27 14:57:14 +01:00
Eugen Rochko
1a1b8170bb
Fix Announce activities of unknown statuses not fetching those statuses ()
Regression from 
2019-02-17 15:16:36 +01:00
Eugen Rochko
147b4c2c3a
Add logging for rejected ActivityPub payloads and add tests () 2019-02-17 03:38:25 +01:00
Eugen Rochko
c417e8c198
Filter incoming Announce activities by relation to local activity ()
* Filter incoming Announce activities by relation to local activity

Reject if announcer is not followed by local accounts, and is not
from an enabled relay, and the object is not a local status

Follow-up to 

* Fix tests
2019-02-15 18:19:45 +01:00