mirror of https://github.com/usbharu/Hideout.git
feat: FollowとAcceptのclassを追加
This commit is contained in:
parent
00fd7f4624
commit
61ddbb5743
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue