group added to status serialization and old group_id usages changed
This commit is contained in:
parent
fc4f3f2831
commit
c311f6b9d0
|
@ -173,13 +173,13 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
handleGroupRemoveAccount = () => {
|
||||
const { status } = this.props;
|
||||
|
||||
this.props.onGroupRemoveAccount(status.get('group_id'), status.getIn(['account', 'id']));
|
||||
this.props.onGroupRemoveAccount(status.getIn(['group', 'id']), status.getIn(['account', 'id']));
|
||||
}
|
||||
|
||||
handleGroupRemovePost = () => {
|
||||
const { status } = this.props;
|
||||
|
||||
this.props.onGroupRemoveStatus(status.get('group_id'), status.get('id'));
|
||||
this.props.onGroupRemoveStatus(status.getIn(['group', 'id']), status.get('id'));
|
||||
}
|
||||
|
||||
_makeMenu = (publicStatus) => {
|
||||
|
|
|
@ -104,6 +104,7 @@ class Status < ApplicationRecord
|
|||
|
||||
cache_associated :application,
|
||||
:media_attachments,
|
||||
:group,
|
||||
:conversation,
|
||||
:status_stat,
|
||||
:tags,
|
||||
|
|
|
@ -4,7 +4,7 @@ class REST::StatusSerializer < ActiveModel::Serializer
|
|||
attributes :id, :created_at, :in_reply_to_id, :in_reply_to_account_id,
|
||||
:sensitive, :spoiler_text, :visibility, :language,
|
||||
:uri, :url, :replies_count, :reblogs_count,
|
||||
:favourites_count, :group_id
|
||||
:favourites_count
|
||||
|
||||
attribute :favourited, if: :current_user?
|
||||
attribute :reblogged, if: :current_user?
|
||||
|
@ -17,6 +17,7 @@ class REST::StatusSerializer < ActiveModel::Serializer
|
|||
belongs_to :reblog, serializer: REST::StatusSerializer
|
||||
belongs_to :application, if: :show_application?
|
||||
belongs_to :account, serializer: REST::AccountSerializer
|
||||
belongs_to :group, serializer: REST::GroupSerializer
|
||||
|
||||
has_many :media_attachments, serializer: REST::MediaAttachmentSerializer
|
||||
has_many :ordered_mentions, key: :mentions
|
||||
|
|
Loading…
Reference in New Issue