diff --git a/app/javascript/flavours/glitch/features/status/index.js b/app/javascript/flavours/glitch/features/status/index.js
index 910be59982..fd27692479 100644
--- a/app/javascript/flavours/glitch/features/status/index.js
+++ b/app/javascript/flavours/glitch/features/status/index.js
@@ -43,7 +43,7 @@ import { initMuteModal } from 'flavours/glitch/actions/mutes';
import { initBlockModal } from 'flavours/glitch/actions/blocks';
import { initReport } from 'flavours/glitch/actions/reports';
import { initBoostModal } from 'flavours/glitch/actions/boosts';
-import { makeCustomEmojiMap, makeGetStatus } from 'flavours/glitch/selectors';
+import { makeGetStatus } from 'flavours/glitch/selectors';
import ScrollContainer from 'flavours/glitch/containers/scroll_container';
import ColumnBackButton from 'flavours/glitch/components/column_back_button';
import ColumnHeader from '../../components/column_header';
@@ -148,7 +148,6 @@ const makeMapStateToProps = () => {
askReplyConfirmation: state.getIn(['local_settings', 'confirm_before_clearing_draft']) && state.getIn(['compose', 'text']).trim().length !== 0,
domain: state.getIn(['meta', 'domain']),
usingPiP: state.get('picture_in_picture').statusId === props.params.statusId,
- emojiMap: makeCustomEmojiMap(state),
};
};
@@ -707,7 +706,6 @@ class Status extends ImmutablePureComponent {
showMedia={this.state.showMedia}
onToggleMediaVisibility={this.handleToggleMediaVisibility}
usingPiP={usingPiP}
- emojiMap={this.props.emojiMap}
/>
{
return hidden && !(isSelf || followingOrRequested);
});
-
-export const makeCustomEmojiMap = createSelector(
- [state => state.get('custom_emojis')],
- items => items.reduce(
- (map, emoji) => map.set(emoji.get('shortcode'), emoji),
- ImmutableMap(),
- ),
-);
diff --git a/app/serializers/rest/reaction_serializer.rb b/app/serializers/rest/reaction_serializer.rb
index 1a5dca0183..007d3b5015 100644
--- a/app/serializers/rest/reaction_serializer.rb
+++ b/app/serializers/rest/reaction_serializer.rb
@@ -3,7 +3,7 @@
class REST::ReactionSerializer < ActiveModel::Serializer
include RoutingHelper
- attributes :name, :count
+ attributes :name, :count, :extern
attribute :me, if: :current_user?
attribute :url, if: :custom_emoji?
@@ -21,6 +21,14 @@ class REST::ReactionSerializer < ActiveModel::Serializer
object.custom_emoji.present?
end
+ def extern
+ if custom_emoji?
+ object.custom_emoji.domain.present?
+ else
+ false
+ end
+ end
+
def url
full_asset_url(object.custom_emoji.image.url)
end