Change subscribing to account_subscribing in relationship response
This commit is contained in:
parent
c9f782ff5e
commit
639efef091
2 changed files with 6 additions and 3 deletions
|
@ -28,7 +28,10 @@ import {
|
|||
} from '../actions/account_notes';
|
||||
import { Map as ImmutableMap, fromJS } from 'immutable';
|
||||
|
||||
const normalizeRelationship = (state, relationship) => state.set(relationship.id, fromJS(relationship));
|
||||
const normalizeRelationship = (state, relationship) => {
|
||||
const { account_subscribing: subscribing, ...other_relationship } = relationship;
|
||||
return state.set(relationship.id, fromJS({ subscribing, ...other_relationship }));
|
||||
};
|
||||
|
||||
const normalizeRelationships = (state, relationships) => {
|
||||
relationships.forEach(relationship => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class REST::RelationshipSerializer < ActiveModel::Serializer
|
||||
attributes :id, :following, :delivery_following, :showing_reblogs, :notifying, :followed_by, :subscribing,
|
||||
attributes :id, :following, :delivery_following, :showing_reblogs, :notifying, :followed_by, :account_subscribing,
|
||||
:blocking, :blocked_by, :muting, :muting_notifications, :requested,
|
||||
:domain_blocking, :endorsed, :note
|
||||
|
||||
|
@ -35,7 +35,7 @@ class REST::RelationshipSerializer < ActiveModel::Serializer
|
|||
instance_options[:relationships].followed_by[object.id] || false
|
||||
end
|
||||
|
||||
def subscribing
|
||||
def account_subscribing
|
||||
instance_options[:relationships].subscribing[object.id] || {}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue