about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/components/components/autosuggest_textarea.jsx9
-rw-r--r--app/assets/javascripts/components/emoji.jsx2
-rw-r--r--app/assets/javascripts/components/features/compose/components/compose_form.jsx4
-rw-r--r--app/assets/javascripts/components/features/getting_started/index.jsx10
-rw-r--r--app/assets/javascripts/components/middleware/errors.jsx2
-rw-r--r--app/assets/javascripts/extras.jsx2
-rw-r--r--app/assets/stylesheets/components.scss6
-rw-r--r--app/services/process_mentions_service.rb2
-rw-r--r--app/workers/notification_worker.rb2
-rw-r--r--app/workers/pubsubhubbub/confirmation_worker.rb2
-rw-r--r--app/workers/pubsubhubbub/delivery_worker.rb6
-rw-r--r--app/workers/thread_resolve_worker.rb2
-rw-r--r--app/workers/unfavourite_worker.rb2
13 files changed, 37 insertions, 14 deletions
diff --git a/app/assets/javascripts/components/components/autosuggest_textarea.jsx b/app/assets/javascripts/components/components/autosuggest_textarea.jsx
index 39ccbcaf9..57352be90 100644
--- a/app/assets/javascripts/components/components/autosuggest_textarea.jsx
+++ b/app/assets/javascripts/components/components/autosuggest_textarea.jsx
@@ -38,7 +38,8 @@ const AutosuggestTextarea = React.createClass({
     onSuggestionsClearRequested: React.PropTypes.func.isRequired,
     onSuggestionsFetchRequested: React.PropTypes.func.isRequired,
     onChange: React.PropTypes.func.isRequired,
-    onKeyUp: React.PropTypes.func
+    onKeyUp: React.PropTypes.func,
+    onKeyDown: React.PropTypes.func
   },
 
   getInitialState () {
@@ -108,6 +109,12 @@ const AutosuggestTextarea = React.createClass({
 
         break;
     }
+
+    if (e.defaultPrevented || !this.props.onKeyDown) {
+      return;
+    }
+
+    this.props.onKeyDown(e);
   },
 
   onBlur () {
diff --git a/app/assets/javascripts/components/emoji.jsx b/app/assets/javascripts/components/emoji.jsx
index a06c75953..c93c07c74 100644
--- a/app/assets/javascripts/components/emoji.jsx
+++ b/app/assets/javascripts/components/emoji.jsx
@@ -5,5 +5,5 @@ emojione.sprites      = false;
 emojione.imagePathPNG = '/emoji/';
 
 export default function emojify(text) {
-  return emojione.unicodeToImage(text);
+  return emojione.toImage(text);
 };
diff --git a/app/assets/javascripts/components/features/compose/components/compose_form.jsx b/app/assets/javascripts/components/features/compose/components/compose_form.jsx
index 55f361b0b..412c29310 100644
--- a/app/assets/javascripts/components/features/compose/components/compose_form.jsx
+++ b/app/assets/javascripts/components/features/compose/components/compose_form.jsx
@@ -49,7 +49,7 @@ const ComposeForm = React.createClass({
     this.props.onChange(e.target.value);
   },
 
-  handleKeyUp (e) {
+  handleKeyDown (e) {
     if (e.keyCode === 13 && (e.ctrlKey || e.metaKey)) {
       this.props.onSubmit();
     }
@@ -115,7 +115,7 @@ const ComposeForm = React.createClass({
           value={this.props.text}
           onChange={this.handleChange}
           suggestions={this.props.suggestions}
-          onKeyUp={this.handleKeyUp}
+          onKeyDown={this.handleKeyDown}
           onSuggestionsFetchRequested={this.onSuggestionsFetchRequested}
           onSuggestionsClearRequested={this.onSuggestionsClearRequested}
           onSuggestionSelected={this.onSuggestionSelected}
diff --git a/app/assets/javascripts/components/features/getting_started/index.jsx b/app/assets/javascripts/components/features/getting_started/index.jsx
index 77253dd73..51f165f9e 100644
--- a/app/assets/javascripts/components/features/getting_started/index.jsx
+++ b/app/assets/javascripts/components/features/getting_started/index.jsx
@@ -43,10 +43,12 @@ const GettingStarted = ({ intl, me }) => {
         {followRequests}
       </div>
 
-      <div className='static-content getting-started'>
-        <p><FormattedMessage id='getting_started.about_addressing' defaultMessage='You can follow people if you know their username and the domain they are on by entering an e-mail-esque address into the form at the top of the sidebar.' /></p>
-        <p><FormattedMessage id='getting_started.about_shortcuts' defaultMessage='If the target user is on the same domain as you, just the username will work. The same rule applies to mentioning people in statuses.' /></p>
-        <p><FormattedMessage id='getting_started.about_developer' defaultMessage='The developer of this project can be followed as Gargron@mastodon.social' /></p>
+      <div className='scrollable optionally-scrollable'>
+        <div className='static-content getting-started'>
+          <p><FormattedMessage id='getting_started.about_addressing' defaultMessage='You can follow people if you know their username and the domain they are on by entering an e-mail-esque address into the form at the top of the sidebar.' /></p>
+          <p><FormattedMessage id='getting_started.about_shortcuts' defaultMessage='If the target user is on the same domain as you, just the username will work. The same rule applies to mentioning people in statuses.' /></p>
+          <p><FormattedMessage id='getting_started.about_developer' defaultMessage='The developer of this project can be followed as Gargron@mastodon.social' /></p>
+        </div>
       </div>
     </Column>
   );
diff --git a/app/assets/javascripts/components/middleware/errors.jsx b/app/assets/javascripts/components/middleware/errors.jsx
index 3a1473bc1..74d77f0f9 100644
--- a/app/assets/javascripts/components/middleware/errors.jsx
+++ b/app/assets/javascripts/components/middleware/errors.jsx
@@ -23,7 +23,7 @@ export default function errorsMiddleware() {
           dispatch(showAlert(title, message));
         } else {
           console.error(action.error);
-          dispatch(showAlert('Oops!', 'An unexpected error occurred. Inspect the console for more details'));
+          dispatch(showAlert('Oops!', 'An unexpected error occurred.'));
         }
       }
     }
diff --git a/app/assets/javascripts/extras.jsx b/app/assets/javascripts/extras.jsx
index b9f8e6842..c1df182de 100644
--- a/app/assets/javascripts/extras.jsx
+++ b/app/assets/javascripts/extras.jsx
@@ -19,8 +19,6 @@ $(() => {
   });
 
   $('.webapp-btn').on('click', e => {
-    console.log(e);
-
     if (e.button === 0) {
       e.preventDefault();
       window.location.href = $(e.target).attr('href');
diff --git a/app/assets/stylesheets/components.scss b/app/assets/stylesheets/components.scss
index c64419243..4f03f94e5 100644
--- a/app/assets/stylesheets/components.scss
+++ b/app/assets/stylesheets/components.scss
@@ -436,6 +436,10 @@
   overflow-x: hidden;
   flex: 1 1 auto;
   -webkit-overflow-scrolling: touch;
+
+  &.optionally-scrollable {
+    overflow-y: auto;
+  }
 }
 
 .column-back-button {
@@ -609,7 +613,9 @@
 }
 
 .getting-started {
+  box-sizing: border-box;
   overflow-y: auto;
   padding-bottom: 235px;
   background: image-url('mastodon-getting-started.png') no-repeat 0 100% local;
+  height: 100%;
 }
diff --git a/app/services/process_mentions_service.rb b/app/services/process_mentions_service.rb
index ee42a5df2..72568e702 100644
--- a/app/services/process_mentions_service.rb
+++ b/app/services/process_mentions_service.rb
@@ -28,7 +28,7 @@ class ProcessMentionsService < BaseService
     status.mentions.each do |mention|
       mentioned_account = mention.account
 
-      next if status.private_visibility? && !mentioned_account.following?(status.account)
+      next if status.private_visibility? && (!mentioned_account.following?(status.account) || !mentioned_account.local?)
 
       if mentioned_account.local?
         NotifyService.new.call(mentioned_account, mention)
diff --git a/app/workers/notification_worker.rb b/app/workers/notification_worker.rb
index 386e94111..e4c38d384 100644
--- a/app/workers/notification_worker.rb
+++ b/app/workers/notification_worker.rb
@@ -3,6 +3,8 @@
 class NotificationWorker
   include Sidekiq::Worker
 
+  sidekiq_options retry: 5
+
   def perform(stream_entry_id, target_account_id)
     SendInteractionService.new.call(StreamEntry.find(stream_entry_id), Account.find(target_account_id))
   end
diff --git a/app/workers/pubsubhubbub/confirmation_worker.rb b/app/workers/pubsubhubbub/confirmation_worker.rb
index 489bd8359..868fd9f97 100644
--- a/app/workers/pubsubhubbub/confirmation_worker.rb
+++ b/app/workers/pubsubhubbub/confirmation_worker.rb
@@ -4,7 +4,7 @@ class Pubsubhubbub::ConfirmationWorker
   include Sidekiq::Worker
   include RoutingHelper
 
-  sidekiq_options queue: 'push'
+  sidekiq_options queue: 'push', retry: false
 
   def perform(subscription_id, mode, secret = nil, lease_seconds = nil)
     subscription = Subscription.find(subscription_id)
diff --git a/app/workers/pubsubhubbub/delivery_worker.rb b/app/workers/pubsubhubbub/delivery_worker.rb
index 35bf7b2f0..15005bc80 100644
--- a/app/workers/pubsubhubbub/delivery_worker.rb
+++ b/app/workers/pubsubhubbub/delivery_worker.rb
@@ -4,7 +4,11 @@ class Pubsubhubbub::DeliveryWorker
   include Sidekiq::Worker
   include RoutingHelper
 
-  sidekiq_options queue: 'push', retry: 5
+  sidekiq_options queue: 'push', retry: 3, dead: false
+
+  sidekiq_retry_in do |count|
+    5 * (count + 1)
+  end
 
   def perform(subscription_id, payload)
     subscription = Subscription.find(subscription_id)
diff --git a/app/workers/thread_resolve_worker.rb b/app/workers/thread_resolve_worker.rb
index 84eae73be..593edd032 100644
--- a/app/workers/thread_resolve_worker.rb
+++ b/app/workers/thread_resolve_worker.rb
@@ -3,6 +3,8 @@
 class ThreadResolveWorker
   include Sidekiq::Worker
 
+  sidekiq_options retry: false
+
   def perform(child_status_id, parent_url)
     child_status  = Status.find(child_status_id)
     parent_status = FetchRemoteStatusService.new.call(parent_url)
diff --git a/app/workers/unfavourite_worker.rb b/app/workers/unfavourite_worker.rb
index a14c82d6f..cce07e486 100644
--- a/app/workers/unfavourite_worker.rb
+++ b/app/workers/unfavourite_worker.rb
@@ -5,5 +5,7 @@ class UnfavouriteWorker
 
   def perform(account_id, status_id)
     UnfavouriteService.new.call(Account.find(account_id), Status.find(status_id))
+  rescue ActiveRecord::RecordNotFound
+    true
   end
 end