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