fix author join for federation callbacks with Poll
This commit is contained in:
parent
374915b45f
commit
800fa1786c
1 changed files with 2 additions and 1 deletions
|
|
@ -5,12 +5,13 @@ class Poll < ActiveRecord::Base
|
|||
belongs_to :status_message
|
||||
has_many :poll_answers, -> { order 'id ASC' }
|
||||
has_many :poll_participations
|
||||
has_one :author, through: :status_message
|
||||
|
||||
xml_attr :question
|
||||
xml_attr :poll_answers, :as => [PollAnswer]
|
||||
|
||||
#forward some requests to status message, because a poll is just attached to a status message and is not sharable itself
|
||||
delegate :author, :author_id, :diaspora_handle, :public?, :subscribers, to: :status_message
|
||||
delegate :author_id, :diaspora_handle, :public?, :subscribers, to: :status_message
|
||||
|
||||
validate :enough_poll_answers
|
||||
validates :question, presence: true
|
||||
|
|
|
|||
Loading…
Reference in a new issue