add global msg recv opt

pull/236/head
Gordon 3 years ago
parent 6f0860d954
commit 8fe6231ebc

@ -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, GlobalMsgRecvOpt, opt).Err() return d.rdb.HSet(context.Background(), key, map[string]interface{}{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

Loading…
Cancel
Save