mirror of
https://github.com/whitechi73/OpenShamrock.git
synced 2024-08-14 13:12:17 +08:00
Shamrock
: add shut_up_timestamp field to get_group_member_list
This commit is contained in:
parent
1b0550b5e1
commit
951e7462c4
@ -25,7 +25,9 @@ internal object GetTroopMemberList : IActionHandler() {
|
|||||||
val memberList = GroupSvc.getGroupMemberList(groupId, refresh).onFailure {
|
val memberList = GroupSvc.getGroupMemberList(groupId, refresh).onFailure {
|
||||||
return error(it.message ?: "unknown error", echo, arrayResult = true)
|
return error(it.message ?: "unknown error", echo, arrayResult = true)
|
||||||
}.getOrThrow()
|
}.getOrThrow()
|
||||||
|
val prohibitedMemberList = GroupSvc.getProhibitedMemberList(groupId.toLong())
|
||||||
|
.getOrDefault(arrayListOf())
|
||||||
|
.associate { it.memberUin to it.shutuptimestap.toLong() }
|
||||||
return ok(arrayListOf<SimpleTroopMemberInfo>().apply {
|
return ok(arrayListOf<SimpleTroopMemberInfo>().apply {
|
||||||
memberList.forEach { info ->
|
memberList.forEach { info ->
|
||||||
if (info.memberuin != "0") {
|
if (info.memberuin != "0") {
|
||||||
@ -60,7 +62,8 @@ internal object GetTroopMemberList : IActionHandler() {
|
|||||||
title = info.mUniqueTitle ?: "",
|
title = info.mUniqueTitle ?: "",
|
||||||
titleExpireTime = info.mUniqueTitleExpire,
|
titleExpireTime = info.mUniqueTitleExpire,
|
||||||
cardChangeable = GroupSvc.isAdmin(groupId),
|
cardChangeable = GroupSvc.isAdmin(groupId),
|
||||||
age = 0
|
age = 0,
|
||||||
|
shutUpTimestamp = prohibitedMemberList[info.memberuin.toLong()] ?: 0L
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package moe.fuqiuluo.shamrock.remote.service.data
|
|||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import moe.fuqiuluo.shamrock.remote.service.data.push.MemberRole
|
import moe.fuqiuluo.shamrock.remote.service.data.push.MemberRole
|
||||||
|
import java.sql.Timestamp
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
internal data class SimpleTroopInfo(
|
internal data class SimpleTroopInfo(
|
||||||
@ -43,6 +44,7 @@ internal data class SimpleTroopMemberInfo(
|
|||||||
@SerialName("role") val role: MemberRole,
|
@SerialName("role") val role: MemberRole,
|
||||||
@SerialName("unfriendly") val unfriendly: Boolean,
|
@SerialName("unfriendly") val unfriendly: Boolean,
|
||||||
@SerialName("card_changeable") val cardChangeable: Boolean,
|
@SerialName("card_changeable") val cardChangeable: Boolean,
|
||||||
|
@SerialName("shut_up_timestamp") val shutUpTimestamp: Long?,
|
||||||
)
|
)
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
|
Loading…
x
Reference in New Issue
Block a user