mirror of https://github.com/usbharu/Hideout.git
feat: Createにidを追加するように
This commit is contained in:
parent
814fe48579
commit
ef713e6d36
|
@ -8,11 +8,13 @@ open class Create : Object {
|
|||
type: List<String> = emptyList(),
|
||||
name: String? = null,
|
||||
`object`: Object?,
|
||||
actor: String? = null
|
||||
actor: String? = null,
|
||||
id: String? = null
|
||||
) : super(
|
||||
add(type, "Create"),
|
||||
name,
|
||||
actor
|
||||
actor,
|
||||
id
|
||||
) {
|
||||
this.`object` = `object`
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package dev.usbharu.hideout.domain.model.ap
|
||||
|
||||
open class Key : Object {
|
||||
var id: String? = null
|
||||
var owner: String? = null
|
||||
var publicKeyPem: String? = null
|
||||
|
||||
|
@ -12,8 +11,7 @@ open class Key : Object {
|
|||
id: String?,
|
||||
owner: String?,
|
||||
publicKeyPem: String?
|
||||
) : super(add(type, "Key"), name) {
|
||||
this.id = id
|
||||
) : super(add(type, "Key"), name,id) {
|
||||
this.owner = owner
|
||||
this.publicKeyPem = publicKeyPem
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package dev.usbharu.hideout.domain.model.ap
|
||||
|
||||
open class Note : Object {
|
||||
var id: String? = null
|
||||
var attributedTo: String? = null
|
||||
var content: String? = null
|
||||
var published: String? = null
|
||||
|
@ -16,8 +15,11 @@ open class Note : Object {
|
|||
content: String?,
|
||||
published: String?,
|
||||
to: List<String> = emptyList()
|
||||
) : super(add(type, "Note"), name) {
|
||||
this.id = id
|
||||
) : super(
|
||||
type = add(type, "Note"),
|
||||
name = name,
|
||||
id = id
|
||||
) {
|
||||
this.attributedTo = attributedTo
|
||||
this.content = content
|
||||
this.published = published
|
||||
|
|
|
@ -10,12 +10,14 @@ open class Object : JsonLd {
|
|||
private var type: List<String> = emptyList()
|
||||
var name: String? = null
|
||||
var actor: String? = null
|
||||
var id:String? = null
|
||||
|
||||
protected constructor()
|
||||
constructor(type: List<String>, name: String? = null,actor:String? = null) : super() {
|
||||
constructor(type: List<String>, name: String? = null,actor:String? = null,id:String? = null) : super() {
|
||||
this.type = type
|
||||
this.name = name
|
||||
this.actor = actor
|
||||
this.id = id
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package dev.usbharu.hideout.domain.model.ap
|
||||
|
||||
open class Person : Object {
|
||||
private var id: String? = null
|
||||
var preferredUsername: String? = null
|
||||
var summary: String? = null
|
||||
var inbox: String? = null
|
||||
|
@ -22,8 +21,7 @@ open class Person : Object {
|
|||
url: String?,
|
||||
icon: Image?,
|
||||
publicKey: Key?
|
||||
) : super(add(type, "Person"), name) {
|
||||
this.id = id
|
||||
) : super(add(type, "Person"), name,id = id) {
|
||||
this.preferredUsername = preferredUsername
|
||||
this.summary = summary
|
||||
this.inbox = inbox
|
||||
|
|
|
@ -55,7 +55,8 @@ class ActivityPubNoteServiceImpl(
|
|||
jsonLd = Create(
|
||||
name = "Create Note",
|
||||
`object` = note,
|
||||
actor = note.attributedTo
|
||||
actor = note.attributedTo,
|
||||
id = "${Config.configData.url}/create/${postEntity.id}"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue