mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
Clear msg
This commit is contained in:
parent
1ff7ebb04a
commit
8315c61240
@ -9,6 +9,7 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/garyburd/redigo/redis"
|
||||
"github.com/mitchellh/mapstructure"
|
||||
"strconv"
|
||||
"time"
|
||||
@ -88,6 +89,9 @@ func (d *DataBases) CleanUpOneUserAllMsgFromRedis(userID string) error {
|
||||
ctx := context.Background()
|
||||
key := messageCache + userID + "_" + "*"
|
||||
vals, err := d.rdb.Keys(ctx, key).Result()
|
||||
if err == redis.ErrNil {
|
||||
return nil
|
||||
}
|
||||
if err != nil {
|
||||
return utils.Wrap(err, "")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user