feat: FollowとAcceptのclassを追加

This commit is contained in:
2023-03-30 17:42:05 +09:00
parent f0eef274fc
commit 209d02b1d2
3 changed files with 33 additions and 1 deletions
@@ -0,0 +1,16 @@
package dev.usbharu.hideout.ap
open class Accept : Object {
public var `object`:Object? = null
public var actor:String? = null
protected constructor() : super()
constructor(
type: List<String> = emptyList(),
name: String,
`object`: Object?,
actor: String?
) : super(add(type,"Accept"), name) {
this.`object` = `object`
this.actor = actor
}
}
@@ -0,0 +1,16 @@
package dev.usbharu.hideout.ap
open class Follow : Object{
public var `object`:Object? = null
public var actor:String? = null
protected constructor() : super()
constructor(
type: List<String> = emptyList(),
name: String,
`object`: Object?,
actor: String?
) : super(add(type,"Follow"), name) {
this.`object` = `object`
this.actor = actor
}
}
@@ -15,7 +15,7 @@ class ActivityPubService() {
return when(typeAsText){
"Follow" -> ActivityType.Follow
"Undo" -> ActivityType.Undo
else -> throw IllegalArgumentException()
else -> throw IllegalArgumentException(typeAsText)
}
}
}