Commit c311f6b9 authored by 2458773093's avatar 2458773093

group added to status serialization and old group_id usages changed

parent fc4f3f28
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment