Skip to content

Commit

Permalink
Fix: Groundpolis Gender
Browse files Browse the repository at this point in the history
  • Loading branch information
atsu1125 committed Dec 17, 2022
1 parent d2e8f31 commit 0ec14ef
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ class Header extends ImmutablePureComponent {
<td><FormattedDate value={birthday} hour12={false} year='numeric' month='short' day='2-digit' />(<FormattedMessage id='account.age' defaultMessage='{age} years old}' values={{age: age(birthday)}} />)</td>
</tr>}
{sex && <tr>
<th><Icon id='sexIcon' fixedWidth aria-hidden='true' /> <FormattedMessage id='account.sex' defaultMessage='Sex' /></th>
<th><Icon id='venus' fixedWidth aria-hidden='true' /> <FormattedMessage id='account.sex' defaultMessage='Sex' /></th>
<td>{sex}</td>
</tr>}
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ class Header extends ImmutablePureComponent {
<td><FormattedDate value={birthday} hour12={false} year='numeric' month='short' day='2-digit' />(<FormattedMessage id='account.age' defaultMessage='{age} years old}' values={{age: age(birthday)}} />)</td>
</tr>}
{sex && <tr>
<th><Icon id='sexIcon' fixedWidth aria-hidden='true' /> <FormattedMessage id='account.sex' defaultMessage='Sex' /></th>
<th><Icon id='venus' fixedWidth aria-hidden='true' /> <FormattedMessage id='account.sex' defaultMessage='Sex' /></th>
<td>{sex}</td>
</tr>}
<tr>
Expand Down
2 changes: 1 addition & 1 deletion app/serializers/activitypub/actor_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer
attribute :suspended, if: :suspended?
attribute :bday, key: :'vcard:bday'
attribute :address, key: :'vcard:Address'
attribute :gender, key: :'vcard:Gender'
attribute :gender, key: :'vcard:gender'

has_many :virtual_other_settings, key: :other_setting

Expand Down
4 changes: 2 additions & 2 deletions app/services/activitypub/process_account_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ def address
end

def gender
return {} if @json['vcard:Gender'].blank?
{ 'sex' => @json['vcard:Gender'] }
return {} if @json['vcard:gender'].blank?
{ 'sex' => @json['vcard:gender'] }
end

DEFER_SETTINGS_KEYS = %w(
Expand Down

0 comments on commit 0ec14ef

Please sign in to comment.