mirror of
https://github.com/InsanusMokrassar/PlaguPoster.git
synced 2024-12-22 22:17:14 +00:00
fixes in panel
This commit is contained in:
parent
5366dcdba1
commit
1f6dd7aad1
@ -27,5 +27,5 @@ fun PostsMessages(
|
|||||||
{ string },
|
{ string },
|
||||||
{ json.encodeToString(ChatIdToMessageSerializer, this) },
|
{ json.encodeToString(ChatIdToMessageSerializer, this) },
|
||||||
{ PostId(this) },
|
{ PostId(this) },
|
||||||
{ json.decodeFromString(ChatIdToMessageSerializer, this) as Pair<IdChatIdentifier, MessageIdentifier> }
|
{ json.decodeFromString(ChatIdToMessageSerializer, this).let { (it.first as IdChatIdentifier) to it.second } }
|
||||||
)
|
)
|
||||||
|
@ -105,17 +105,19 @@ class ExposedPostsRepo(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun onAfterCreate(values: List<Pair<NewPost, RegisteredPost>>): List<RegisteredPost> {
|
override suspend fun onAfterCreate(values: List<Pair<NewPost, RegisteredPost>>): List<RegisteredPost> {
|
||||||
values.forEach {
|
return values.map {
|
||||||
updateContent(it.second.copy(content = it.first.content))
|
val actual = it.second.copy(content = it.first.content)
|
||||||
|
updateContent(actual)
|
||||||
|
actual
|
||||||
}
|
}
|
||||||
return super.onAfterCreate(values)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun onAfterUpdate(value: List<UpdatedValuePair<NewPost, RegisteredPost>>): List<RegisteredPost> {
|
override suspend fun onAfterUpdate(value: List<UpdatedValuePair<NewPost, RegisteredPost>>): List<RegisteredPost> {
|
||||||
value.forEach {
|
return value.map {
|
||||||
updateContent(it.second.copy(content = it.first.content))
|
val actual = it.second.copy(content = it.first.content)
|
||||||
|
updateContent(actual)
|
||||||
|
actual
|
||||||
}
|
}
|
||||||
return super.onAfterUpdate(value)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun deleteById(ids: List<PostId>) {
|
override suspend fun deleteById(ids: List<PostId>) {
|
||||||
|
Loading…
Reference in New Issue
Block a user