mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-23 22:30:47 +08:00
Filter repeated GroupNameChangeEvent
This commit is contained in:
parent
2a7496c0b5
commit
5e553a56ca
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user