Commit 5e553a56 authored by ryoii's avatar ryoii

Filter repeated GroupNameChangeEvent

parent 2a7496c0
......@@ -311,14 +311,18 @@ internal class OnlinePush {
// println(dataBytes.toUHexString())
if (dataBytes[0].toInt() != 59) {
return@flatMap sequenceOf(
GroupNameChangeEvent(
origin = group.name.also { group._name = message },
new = message,
group = group,
isByBot = false
return@flatMap if (group.name != message) {
sequenceOf(
GroupNameChangeEvent(
origin = group.name.also { group._name = message },
new = message,
group = group,
isByBot = false
)
)
)
} else {
sequenceOf()
}
} else {
//println(message + ":" + dataBytes.toUHexString())
when (message) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment