object_validators: likes & announcements as [ObjectID]
This commit is contained in:
		
							parent
							
								
									846b59ccb0
								
							
						
					
					
						commit
						2132b24a9d
					
				
					 3 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -49,8 +49,8 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.AudioVideoValidator do
 | 
			
		|||
    field(:inReplyTo, ObjectValidators.ObjectID)
 | 
			
		||||
    field(:url, ObjectValidators.Uri)
 | 
			
		||||
 | 
			
		||||
    field(:likes, {:array, :string}, default: [])
 | 
			
		||||
    field(:announcements, {:array, :string}, default: [])
 | 
			
		||||
    field(:likes, {:array, ObjectValidators.ObjectID}, default: [])
 | 
			
		||||
    field(:announcements, {:array, ObjectValidators.ObjectID}, default: [])
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def cast_and_apply(data) do
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -43,8 +43,8 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.NoteValidator do
 | 
			
		|||
    field(:inReplyTo, ObjectValidators.ObjectID)
 | 
			
		||||
    field(:url, ObjectValidators.Uri)
 | 
			
		||||
 | 
			
		||||
    field(:likes, {:array, :string}, default: [])
 | 
			
		||||
    field(:announcements, {:array, :string}, default: [])
 | 
			
		||||
    field(:likes, {:array, ObjectValidators.ObjectID}, default: [])
 | 
			
		||||
    field(:announcements, {:array, ObjectValidators.ObjectID}, default: [])
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def cast_and_validate(data) do
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,8 +47,8 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.QuestionValidator do
 | 
			
		|||
    # short identifier for PleromaFE to group statuses by context
 | 
			
		||||
    field(:context_id, :integer)
 | 
			
		||||
 | 
			
		||||
    field(:likes, {:array, :string}, default: [])
 | 
			
		||||
    field(:announcements, {:array, :string}, default: [])
 | 
			
		||||
    field(:likes, {:array, ObjectValidators.ObjectID}, default: [])
 | 
			
		||||
    field(:announcements, {:array, ObjectValidators.ObjectID}, default: [])
 | 
			
		||||
 | 
			
		||||
    field(:closed, ObjectValidators.DateTime)
 | 
			
		||||
    field(:voters, {:array, ObjectValidators.ObjectID}, default: [])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue