소스 검색

Handle blank poll options more gracefully (#10946)

Pleroma currently allows (erroneously imho) empty poll options, that is,
options with an empty (but existing) `name`.
master^2
ThibG 5 년 전
committed by Eugen Rochko
부모
커밋
3a84bacf86
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -1
      app/lib/activitypub/activity/create.rb

+ 1
- 1
app/lib/activitypub/activity/create.rb 파일 보기

@@ -234,7 +234,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
@account.polls.new(
multiple: multiple,
expires_at: expires_at,
options: items.map { |item| item['name'].presence || item['content'] },
options: items.map { |item| item['name'].presence || item['content'] }.compact,
cached_tallies: items.map { |item| item.dig('replies', 'totalItems') || 0 }
)
end


불러오는 중...
취소
저장