You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
488 B
26 lines
488 B
package msg
|
|
|
|
import (
|
|
"Open_IM/pkg/common/config"
|
|
"Open_IM/pkg/common/constant"
|
|
"Open_IM/pkg/proto/sdkws"
|
|
)
|
|
|
|
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
|
|
}
|
|
}
|
|
return true
|
|
}
|