add global msg recv opt

This commit is contained in:
Gordon 2022-06-15 13:12:16 +08:00
parent 8fe6231ebc
commit d3279694b7

View File

@ -25,7 +25,7 @@ import (
//} //}
func (d *DataBases) SetUserGlobalMsgRecvOpt(userID string, opt int32) error { func (d *DataBases) SetUserGlobalMsgRecvOpt(userID string, opt int32) error {
key := conversationReceiveMessageOpt + userID key := conversationReceiveMessageOpt + userID
return d.rdb.HSet(context.Background(), key, map[string]interface{}{GlobalMsgRecvOpt: opt}).Err() return d.rdb.HSet(context.Background(), key, GlobalMsgRecvOpt, opt).Err()
} }
func (d *DataBases) GetUserGlobalMsgRecvOpt(userID string) (int, error) { func (d *DataBases) GetUserGlobalMsgRecvOpt(userID string) (int, error) {
key := conversationReceiveMessageOpt + userID key := conversationReceiveMessageOpt + userID