1
This commit is contained in:
parent
84be8df2b0
commit
cd419da1f8
@ -37,6 +37,7 @@ type Player interface {
|
||||
MarkMails([]Mail) error
|
||||
GetAttachment([]Mail) error
|
||||
DeleteMails([]Mail) error
|
||||
IsReadable(Mail) bool
|
||||
}
|
||||
|
||||
type PlayerMgr interface {
|
||||
|
@ -115,11 +115,13 @@ func (this *mailMgr) CaGetMailList(c *gin.Context) {
|
||||
hum,
|
||||
func (m *mail) bool {
|
||||
if m.IsValid(hum) {
|
||||
if hum.IsReadable(m) {
|
||||
mailDto := new(common.MailDto)
|
||||
if m.fillMailDto(mailDto) {
|
||||
q5.AppendSlice(&rspObj.MailList, mailDto)
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
})
|
||||
c.JSON(200, rspObj)
|
||||
|
@ -140,6 +140,10 @@ func (this *player) getInbox(mailId int64) *inbox {
|
||||
}
|
||||
}
|
||||
|
||||
func (this* player) IsReadable(mail common.Mail) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func newPlayer() *player {
|
||||
p := new(player)
|
||||
p.init()
|
||||
|
Loading…
x
Reference in New Issue
Block a user