mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-20 11:35:29 +01:00
Only normalize local polls (#12515)
Before this patch, if remote poll options have leading or trailing spaces, the information stored locally won't match them, causing federated voting to fail.
This commit is contained in:
parent
d70268f099
commit
f60cd97638
@ -36,7 +36,7 @@ class Poll < ApplicationRecord
|
||||
scope :attached, -> { where.not(status_id: nil) }
|
||||
scope :unattached, -> { where(status_id: nil) }
|
||||
|
||||
before_validation :prepare_options
|
||||
before_validation :prepare_options, if: :local?
|
||||
before_validation :prepare_votes_count
|
||||
|
||||
after_initialize :prepare_cached_tallies
|
||||
|
Loading…
Reference in New Issue
Block a user