Commit Graph
5473 Commits
Author SHA1 Message Date
Eugen RochkoandGitHub 0eaf6d7693 Sort self-replies to the top of descendants (#9320)
Fix #6463
2018-11-24 20:48:50 +01:00
Eugen Rochko a2cda74ba3 Fix connect timeout not being enforced (#9329)
* Fix connect timeout not being enforced

The loop was catching the timeout exception that should stop execution, so the next IP would no longer be within a timed block, which led to requests taking much longer than 10 seconds.

* Use timeout on each IP attempt, but limit to 2 attempts

* Fix code style issue

* Do not break Request#perform if no block given

* Update method stub in spec for Request

* Move timeout inside the begin/rescue block

* Use Resolv::DNS with timeout of 1 to get IP addresses

* Update Request spec to stub Resolv::DNS instead of Addrinfo

* Fix Resolve::DNS stubs in Request spec
2018-11-23 22:17:04 +01:00
valeraukoandEugen Rochko 12bdd7dc5f Ignore JSON-LD profile in mime type comparison (#9179)
Ignore JSON-LD profile in mime type comparison
2018-11-23 22:16:13 +01:00
Alexandre AlapetiteandEugen Rochko 2c36d35784 WebSub: ATOM before RSS (#9302)
Hello,
The ATOM feed contains the hub declaration for WebSub, but the RSS
version does not.
RSS/ATOM readers will typically pick whichever version comes first, and
will thus not see the WebSub feature.
I therefore suggest putting the ATOM version first, as it is more
feature-rich than its RSS counterpart is.

Clients not compatible with ATOM would not pick it anyway due to the
different type attribute.

A more complicated alternative would be to declare the WebSub feature in
the RSS version as well, using something like the following code, and
ensuring that clients subscribed to the RSS version would receive PuSH
updates just like those subscribed to the ATOM version.

````xml
<rss version="2.0" xmlns:webfeeds="http://webfeeds.org/rss/1.0"
xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link rel="self" type="application/rss+xml"
href="https://diaspodon.fr/users/test.rss"/>
<atom:link rel="hub" href="https://diaspodon.fr/api/push"/>
</channel>
</rss>
```
2018-11-23 22:15:46 +01:00
Eugen Rochko fa02f878fc Fix filter ID not being a string in REST API (#9303) 2018-11-23 22:15:22 +01:00
Eugen Rochko ecc58c0f23 Prevent multiple handlers for Delete of Actor from running (#9292) 2018-11-23 22:15:12 +01:00
Eugen Rochko 6d4438a6ae Remove intermediary arrays when creating hash maps from results (#9291) 2018-11-23 22:15:03 +01:00
ThibGandEugen Rochko a3ef076160 Fix race condition causing shallow status with only a "favourited" attribute (#9272)
Fixes #9231
2018-11-23 22:14:42 +01:00
Eugen Rochko cd8575aef6 Fix null error introduced in #9270 (#9275) 2018-11-23 22:14:35 +01:00
ThibGandEugen Rochko 4ce6ed2021 Perform deep comparison for card data when receiving new props (#9270)
Fixes #9226
2018-11-23 22:14:25 +01:00
ThibGandEugen Rochko 886ef1cc38 Fix emoji update date processing (#9255) 2018-11-23 22:14:15 +01:00
ThibGandEugen Rochko d06a724b1c Check that twitter:player is valid before using it (#9254)
Fixes #9251
2018-11-23 22:14:08 +01:00
Eugen Rochko 0f436de035 Add "Show thread" link to self-replies (#9228)
Fix #4716
2018-11-23 22:12:56 +01:00
Eugen Rochko 4b2f254806 Fix form validation flash message color and input borders (#9235)
* Fix form validation flash message color and input borders

* Fix typo
2018-11-23 22:12:42 +01:00
Eugen Rochko b3c29ece47 Fix follow limit validator reporting lower number past threshold (#9230)
* Fix follow limit validator reporting lower number past threshold

* Avoid floating point follow limit
2018-11-23 22:12:33 +01:00
Eugen Rochko 330401bec0 Optimize the process of following someone (#9220)
* Eliminate extra accounts select query from FollowService

* Optimistically update follow state in web UI and hide loading bar

Fix #6205

* Asynchronize NotifyService in FollowService

And fix failing test

* Skip Webfinger resolve routine when called from FollowService if possible

If an account is ActivityPub, then webfinger re-resolving is not necessary
when called from FollowService. Improve options of ResolveAccountService
2018-11-23 22:12:26 +01:00
Eugen Rochko 5ee4fd4606 Increase default column width from 330px to 350px (#9227) 2018-11-23 22:12:15 +01:00
m.bandEugen Rochko 430499fbe1 Update resolve_url_service.rb (#9188) 2018-11-23 22:11:31 +01:00
Steven TappertandEugen Rochko 449e6e451f Check for empty "last_status" before sorting DM column (#9207)
* Check for empty "last_status" before sorting

* Small touchups for codeclimate
2018-11-23 22:11:05 +01:00
Eugen RochkoandGitHub 87a43274f1 Revert "Sort self-replies to the top of the thread (#9296)" (#9335)
This reverts commit 074960bb0f.

Fix #9315
2018-11-23 21:58:01 +01:00
Eugen RochkoandGitHub fd8145d232 Fix connect timeout not being enforced (#9329)
* Fix connect timeout not being enforced

The loop was catching the timeout exception that should stop execution, so the next IP would no longer be within a timed block, which led to requests taking much longer than 10 seconds.

* Use timeout on each IP attempt, but limit to 2 attempts

* Fix code style issue

* Do not break Request#perform if no block given

* Update method stub in spec for Request

* Move timeout inside the begin/rescue block

* Use Resolv::DNS with timeout of 1 to get IP addresses

* Update Request spec to stub Resolv::DNS instead of Addrinfo

* Fix Resolve::DNS stubs in Request spec
2018-11-22 20:12:04 +01:00
valeraukoandEugen Rochko 824497fbce Ignore JSON-LD profile in mime type comparison (#9179)
Ignore JSON-LD profile in mime type comparison
2018-11-22 12:49:07 +01:00
ThibGandEugen Rochko 466e3d710c Include replies to list owner and replies to list members in list statuses (#9324) 2018-11-21 17:02:58 +01:00
Eugen RochkoandGitHub 384e953b75 Revert connect timeout from 1s to 10s (#9319)
The failure rate in Sidekiq is too high
2018-11-21 17:00:56 +01:00
Alexandre AlapetiteandEugen Rochko d1d2377870 WebSub: ATOM before RSS (#9302)
Hello,
The ATOM feed contains the hub declaration for WebSub, but the RSS
version does not.
RSS/ATOM readers will typically pick whichever version comes first, and
will thus not see the WebSub feature.
I therefore suggest putting the ATOM version first, as it is more
feature-rich than its RSS counterpart is.

Clients not compatible with ATOM would not pick it anyway due to the
different type attribute.

A more complicated alternative would be to declare the WebSub feature in
the RSS version as well, using something like the following code, and
ensuring that clients subscribed to the RSS version would receive PuSH
updates just like those subscribed to the ATOM version.

````xml
<rss version="2.0" xmlns:webfeeds="http://webfeeds.org/rss/1.0"
xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link rel="self" type="application/rss+xml"
href="https://diaspodon.fr/users/test.rss"/>
<atom:link rel="hub" href="https://diaspodon.fr/api/push"/>
</channel>
</rss>
```
2018-11-20 22:25:04 +01:00
Eugen RochkoandGitHub 0c666ae5e6 Cast status_count to integer (#9314)
It is returned as a double because the sum is now over bigint columns

Fix #9312
2018-11-20 02:52:52 +01:00
James KieselandEugen Rochko 6a65d87f4d Simplify hashtag query service, perf increase for 'any' tags (#9298) 2018-11-19 12:49:50 +01:00
Eugen RochkoandGitHub 1d38c9750a Fix filter ID not being a string in REST API (#9303) 2018-11-19 10:37:57 +01:00
Eugen RochkoandGitHub d6b9a62e0a Extract counters from accounts table to account_stats table (#9295) 2018-11-19 00:43:52 +01:00
James KieselandEugen Rochko 4fdefffb99 Deep compare tags for hashtag column reload (#9297)
* Deep compare tags for hashtag column reload

* Don't use global lodash
2018-11-17 11:07:48 +01:00
Eugen RochkoandGitHub 9311430ed7 Prevent multiple handlers for Delete of Actor from running (#9292) 2018-11-16 19:46:23 +01:00
Eugen RochkoandGitHub 074960bb0f Sort self-replies to the top of the thread (#9296)
Fix #6463
2018-11-16 19:34:10 +01:00
Eugen RochkoandGitHub 8069fd636b Remove intermediary arrays when creating hash maps from results (#9291) 2018-11-16 15:02:18 +01:00
mayaehandEugen Rochko bdd3c8c255 Change the password form order (#9267)
* Change order of password.

* Update Japanese translation for "Show thread".

* Separate the translation PR.
2018-11-16 11:18:43 +01:00
mayaehandYamagishi Kazutoshi 560acf171e Update Japanese translation for "Show thread". (#9287) 2018-11-16 11:16:10 +09:00
ThibGandEugen Rochko c875f19673 Fix race condition causing shallow status with only a "favourited" attribute (#9272)
Fixes #9231
2018-11-13 14:58:14 +01:00
Eugen RochkoandGitHub bb69d154c4 Fix null error introduced in #9270 (#9275) 2018-11-12 22:07:31 +01:00
ThibGandEugen Rochko bbd8fdd185 Perform deep comparison for card data when receiving new props (#9270)
Fixes #9226
2018-11-12 18:17:50 +01:00
Les OrchardandEugen Rochko cc1f13dfd0 Only consider mouse move in scrolling on item insertion (#9262)
Fixes #9259
2018-11-11 23:20:20 +01:00
mayaehandEugen Rochko 208d278cbc i18n: Add ja translations (#9261)
* Run yarn manage:translations

* Add Japanese translations.
2018-11-11 18:57:16 +01:00
ThibGandEugen Rochko 7f5a4be580 Fix emoji update date processing (#9255) 2018-11-10 23:59:51 +01:00
ThibGandEugen Rochko 9b89c62d43 Check that twitter:player is valid before using it (#9254)
Fixes #9251
2018-11-10 20:42:04 +01:00
Eugen RochkoandGitHub 3cecf3e5b9 Fix loading indicator inconsistency (#9252)
* Use global loading indicator when loading more items

* Use local loading indicator for notifications

And remove global loading indicator for initial custom emojis load
2018-11-10 15:04:13 +01:00
Les OrchardandEugen Rochko 2f86fc5e0a Identify manual scrolling to cancel scroll to top reset on mouse idle (#9245) 2018-11-09 18:06:43 +01:00
ThibGandEugen Rochko 08b3de4d5e Remove unused computation of reblog references from updateTimeline (#9244) 2018-11-09 17:43:25 +01:00
Eugen RochkoandGitHub 4615512285 Reduce connect timeout limit and limit signature failures by source IP (#9236)
* Reduce connect timeout from 10s to 1s

* Limit failing signature verifications per source IP
2018-11-08 21:35:58 +01:00
Eugen RochkoandGitHub dd00cd19d2 Use local instead of global loading indicator for timelines, account timelines (#9224)
So that opening a profile feels faster. Also, pinned toots are not
shown before other toots have loaded. Also, if no toots are loaded,
added empty message
2018-11-08 21:35:06 +01:00
Eugen RochkoandGitHub 5cbf6cf3ec Add "Show thread" link to self-replies (#9228)
Fix #4716
2018-11-08 21:08:57 +01:00
Eugen RochkoandGitHub ccbdf689e8 Fix form validation flash message color and input borders (#9235)
* Fix form validation flash message color and input borders

* Fix typo
2018-11-08 21:06:14 +01:00
Eugen RochkoandGitHub 7f4adfaf77 Fix follow limit validator reporting lower number past threshold (#9230)
* Fix follow limit validator reporting lower number past threshold

* Avoid floating point follow limit
2018-11-08 21:06:01 +01:00