Skip to content

Commit

Permalink
Фикс сканнера
Browse files Browse the repository at this point in the history
  • Loading branch information
Spliterash committed Aug 29, 2024
1 parent 533a77b commit a4189f7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
import com.fasterxml.jackson.annotation.JsonProperty
import ru.spliterash.vkVideoUnlocker.longpoll.message.attachments.SomethingWithAttachments
import ru.spliterash.vkVideoUnlocker.longpoll.message.attachments.VkLink
import ru.spliterash.vkVideoUnlocker.longpoll.message.attachments.Wall
import ru.spliterash.vkVideoUnlocker.story.vkModels.VkStory
import ru.spliterash.vkVideoUnlocker.video.vkModels.VkVideo

data class Attachment(
@JsonProperty("video") val video: VkVideo?,
@JsonProperty("wall") val wall: SomethingWithAttachments?,
@JsonProperty("wall") val wall: Wall?,
@JsonProperty("wall_reply") val wallReply: SomethingWithAttachments?,
@JsonProperty("story") val story: VkStory?,
@JsonProperty("link") val link: VkLink?,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package ru.spliterash.vkVideoUnlocker.longpoll.message.attachments

import com.fasterxml.jackson.annotation.JsonProperty
import ru.spliterash.vkVideoUnlocker.longpoll.message.Attachment

data class Wall(
@JsonProperty("attachments")
val attachments: List<Attachment> = listOf(),
@JsonProperty("copy_history")
val copyHistory: List<Wall> = listOf(),
) : AttachmentContainer, AttachmentContent {
override fun containers(): List<AttachmentContainer> = copyHistory

override fun attachments(): List<Attachment> = attachments
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import ru.spliterash.vkVideoUnlocker.video.vkModels.VkVideo
import ru.spliterash.vkVideoUnlocker.vk.MessageScanner
import ru.spliterash.vkVideoUnlocker.vk.actor.GroupUser
import ru.spliterash.vkVideoUnlocker.vk.api.VkApi
import ru.spliterash.vkVideoUnlocker.wall.vkModels.WallPost
import java.util.function.Predicate
import java.util.regex.Pattern

Expand All @@ -34,7 +35,7 @@ class MessageUtils(
root,
listOf(
MessageScanner.Checker { it.video },
MessageScanner.Checker { it.story }
MessageScanner.Checker { it.story },
),
containerPredicate
)
Expand Down

0 comments on commit a4189f7

Please sign in to comment.