Files
open-im-server/internal/rpc/msg/utils.go
T

26 lines
488 B
Go
Raw Normal View History

2023-02-13 10:33:54 +08:00
package msg
import (
2023-02-13 15:52:41 +08:00
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/proto/sdkws"
2023-02-13 10:33:54 +08:00
)
2023-02-13 15:52:41 +08:00
func isMessageHasReadEnabled(msgData *sdkws.MsgData) bool {
switch msgData.ContentType {
case constant.HasReadReceipt:
if config.Config.SingleMessageHasReadReceiptEnable {
return true
} else {
return false
}
case constant.GroupHasReadReceipt:
if config.Config.GroupMessageHasReadReceiptEnable {
return true
} else {
return false
}
2023-02-13 10:33:54 +08:00
}
2023-02-13 15:52:41 +08:00
return true
2023-02-13 10:33:54 +08:00
}