Commit Graph

5968 Commits

Author SHA1 Message Date
9b8a448477 Isolate each specs for cache store (#6450)
The cache store is explicitly used by some specs, but they were not
isolated and therefore not reliable. This fixes the issue by clearing
the cache after each specs.
2018-02-17 22:35:05 +01:00
a71af98401 Push discovered status through streaming API within a time window (#6484)
Time window of 6 hours
2018-02-17 14:28:48 +01:00
a7c50c7aba Limit the languages used for notification mailer test (#6487)
Some available languages lack translations for notification mails. Now it
tests for two languages which is certain to have required translations:
German and English.

German is the language the current project owner, Eugen Rochko speaks, and
providing English translations for new messages is de facto mandatory.
2018-02-17 14:27:51 +01:00
3d033a4687 Merge remote-tracking branch 'tootsuite/master' into merge-upstream
Conflicts:
	Gemfile
	config/locales/simple_form.pl.yml
2018-02-17 00:02:37 -06:00
c770b503c0 Fix Spanish translation of remote_follow acct (#6475) 2018-02-17 03:53:38 +09:00
ffdf0f2ff6 Fix Catalan translation of remote_follow acct (#6476) 2018-02-16 19:15:56 +01:00
eb3262b941 [Nanobox] Fix backups for file storage (#6483) 2018-02-16 17:10:01 +01:00
9dbae6e8a1 Save video metadata and improve video OpenGraph tags (#6481)
* Save metadata from video attachments, put correct dimensions into OG tags

* Add twitter:player for videos

* Fix code style and test
2018-02-16 07:22:20 +01:00
1122579216 Do not hide NSFW media/CW'd text in OpenGraph tags (#6479)
Reasoning: HTML title tag affects everyone. But OpenGraph only affects
when somebody is deliberately sharing the content, usually in an
environment where such content is expected. Hiding the content in
OpenGraph tags results in deceitful previews which inhibit the
shareability of the post.

Example: Somebody writes a clever post about politics but kindly
puts a "uspol" content warning on it. Mastodon users are thankful,
but sharing this post on another platform results in non-Mastodon
users believing the entire contents of the post is "uspol" and not
clicking through/reading and re-sharing.
2018-02-16 04:40:53 +01:00
478ca39e5e After click to embed video, autoplay it (#6480) 2018-02-15 23:05:12 +01:00
f7765acf9d Fix #5173: Click card to embed external content (#6471) 2018-02-15 07:04:28 +01:00
ecdac9017e Fix media button type (#6478) 2018-02-15 04:40:42 +01:00
ba8ec4eed6 i18n: Update Polish translation (#6470)
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2018-02-14 07:55:45 +09:00
e9052ceaaf Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2018-02-11 23:17:11 +00:00
6ef3874b2e Fix URLs incorrectly having trailing hyphen removed (#6465)
In cases where a URL has a trailing hyphen the FetchLinkCardService incorrectly removes the hyphen when it is parsed

The hyphen is not a reserved character in the URI spec https://tools.ietf.org/html/rfc3986#section-2.2
2018-02-11 23:49:18 +01:00
e20700fe8f Fix Chewy trying to update index with the wrong strategy (#6464) 2018-02-11 22:59:44 +01:00
5ffa6f0fa1 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2018-02-11 18:17:11 +00:00
cf36d184f4 Interactive rake mastodon:setup task (#6451)
* Add better CLI prompt

* Add rake mastodon:setup interactive wizard

* Test db/redis/smtp configurations and add admin user at the end

* Test database connection even when database does not exist yet
2018-02-11 18:40:57 +01:00
efc9ffcb80 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2018-02-11 04:10:16 +00:00
b6159bcb0a Merge remote-tracking branch 'origin/merge-upstream' 2018-02-10 22:08:45 -06:00
136458eaf4 Merge pull request #362 from ThibG/glitch-soc/fix-notifications-clearing
Revert 245816ab27 (fixes #348)
2018-02-10 21:47:27 -05:00
20b519f0fc Merge pull request #236 from glitch-soc/plaintext-mutes
Make keyword mutes operate on plain text input
2018-02-10 21:46:19 -05:00
380989def8 Remove NOKOGIRI_USE_SYSTEM_LIBRARIES from Travis. #236.
Nokogiri linked to the version of libxml2 shipped in Travis' Trusty
image exhibits incorrect behavior when parsing strings resembling

    <p>I <3 oats</p>

In particular, Html2Text.convert (which uses nokogiri) will return "I"
for the above string when it ought to return "I <3 oats".

The version of libxml2 shipped with nokogiri 1.8.1+ exhibits correct
parse behavior for this string, as does the libxml2 present in Ubuntu
Xenial.
2018-02-10 19:29:17 -06:00
fb6f131fa1 Revert 245816ab27 (fixes #348)
Since 245816ab27, IntersectionObserverArticle
assumes that its children do not change unless the number of children changes.

This is not the case with the notification overlay, which resulted in the
checkmark of notification cleaning mode not updating unless scrolling to make
notifications appear/disappear.

This change may negatively impact performances.
2018-02-10 20:59:50 +01:00
f1f67c46c5 Use Html2Text to generate plaintext for keyword mutes. #236.
This allows us to match URLs inside link hrefs.
2018-02-10 10:36:16 -06:00
9105b0c954 Introduce html2text for extracting plaintext from statuses. #236.
Unlike strip_tags, html2text will preserve text present in other nodes,
e.g. anchor tags:

    [1] pry(main)> str = '<a href="http://www.example.com">A link</a>'
    => "<a href=\"http://www.example.com\">A link</a>"
    [2] pry(main)> Html2Text.convert(str)
    => "[A link](http://www.example.com)"
    [3] pry(main)> include ActionView::Helpers::SanitizeHelper
    => Object
    [4] pry(main)> strip_tags(str)
    => "A link"

Preserving the href of an anchor allows keyword mutes to also match on
URLs, which is something that the frontend regex filter can currently
do.
2018-02-10 10:36:16 -06:00
53c86b29f0 Glitch::FilterHelper -> Glitch::KeywordMuteHelper. #234.
The class helps out with keyword mutes, not just some general concept of
"filtering".
2018-02-10 10:36:15 -06:00
718802a05d Added FetchRemoteAccountService spec (#6456)
* Added #link_header spec

* Added #call spec

* Delete spec of private methods

* Added #call spec
2018-02-10 17:10:57 +01:00
411c9ecb4b Fix password recovery (#6459)
* Fix password recovery

* Use “resource” instead of “current_user”
2018-02-10 17:09:44 +01:00
d263e3bc2d Fill out some examples for Glitch::FilterHelper. #234.
Also add HTML entity decoding to Glitch::FilterHelper, which is needed
to e.g. match "<" to the tag-stripped version of "<p><3</p>" or
"<p>&lt;3</p>".
2018-02-10 02:40:27 -06:00
29b5b46c87 Strip HTML from keyword mute input. #234. 2018-02-10 02:40:27 -06:00
cbe8743e47 Added #call spec (#6455)
* Added #link_header spec

* Added #call spec

* Delete spec of private methods
2018-02-10 03:31:38 +01:00
3ebc0ad4d3 Full-text search for authorized statuses (#6423)
* Add full-text search for authorized statuses

- Search API will return statuses that match the query
- Only for logged in users
- Only if you are author of the status,
- Or you were mentioned in it
- Or you favourited or reblogged it
- Configuration over `ES_ENABLED`, `ES_HOST`, `ES_PORT`, `ES_PREFIX`
- Run `rails chewy:deploy` to create & populate index

Fix #5880
Fix #4293
Fix #1152

* Add commented out docker-compose configuration for ES container

* Optimize index import, filter search results

* Add basic normalization to the index

* Add better stemming and normalization to the index

* Skip webfinger request if search query includes both @ and a space

* Fix code style

* Visually separate search result sections

* Fix code style issues
2018-02-09 23:04:47 +01:00
b8efc3fc0b Normalize simple_form.en.yml. 2018-02-09 09:41:57 -06:00
020b40efdb Merge remote-tracking branch 'origin/master' into merge-upstream
Conflicts:
	.travis.yml
	app/lib/user_settings_decorator.rb
	app/models/user.rb
	app/serializers/initial_state_serializer.rb
	app/views/stream_entries/_detailed_status.html.haml
	app/views/stream_entries/_simple_status.html.haml
	config/locales/simple_form.en.yml
2018-02-09 09:25:53 -06:00
235c14c79d fix-indent (#6453) 2018-02-09 15:29:48 +01:00
2ef9d0e101 Change web UI "posts" to "toots" on profile for consistency (#6447) 2018-02-09 00:27:18 +01:00
76f3d5d16b Add preference to always display sensitive media (#6448) 2018-02-09 00:26:57 +01:00
5ba2c300d8 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2018-02-08 23:17:14 +00:00
1167c6dbf8 Perform request spec (#6446)
* Added #link_header spec

* Added #perform_request spec
2018-02-09 08:12:35 +09:00
298c81c00f Clear account cache of notification target_status (#6442) 2018-02-08 15:33:23 +01:00
cf32f7da5c Fix response of signature_verification_failure_reason (#6441) 2018-02-08 05:00:45 +01:00
2bb393684b Added #link_header spec (#6439) 2018-02-08 08:17:53 +09:00
67f7ffa792 Change user_id column non-nullable (#6435) 2018-02-07 16:35:44 +01:00
3405ea6dd9 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2018-02-05 02:17:12 +00:00
95c8232109 match hashtag regex in js client with server (#6431)
the slight mismatch in hashtag regex between js and ruby was causing
hashtag warning to be displayed for unlisted tweets when an invalid
hashtag was entered

exact version of ruby regex not possible in js as POSIX bracket
expressions are not supported, this version approximates and doesn't
give same unicode support
2018-02-05 02:44:13 +01:00
e815d6803d db/schema.rb: resolve erroneously-unresolved conflict 2018-02-04 17:04:22 -06:00
a6fb1c58ee Merge remote-tracking branch 'origin/master' into merge-upstream
Conflicts:
	.env.production.sample
	app/controllers/auth/confirmations_controller.rb
	db/schema.rb
2018-02-04 16:36:19 -06:00
38e0133e1b Make PAM gem optional, allow configuration over environment (#6415) 2018-02-04 15:05:53 +01:00
9b6223f5e2 Validation of count works even when text of status is nil (#6429) 2018-02-04 12:32:41 +01:00