mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
conversation
This commit is contained in:
parent
3391bd8322
commit
73a73b7bc7
@ -463,9 +463,15 @@ func GetConversationFromCache(ownerUserID, conversationID string) (*db.Conversat
|
||||
return "", utils.Wrap(err, "get failed")
|
||||
}
|
||||
bytes, err := json.Marshal(conversation)
|
||||
return string(bytes), utils.Wrap(err, "Marshal failed")
|
||||
if err != nil {
|
||||
return "", utils.Wrap(err, "Marshal failed")
|
||||
}
|
||||
return string(bytes), nil
|
||||
}
|
||||
conversationStr, err := db.DB.Rc.Fetch(conversationCache+ownerUserID+":"+conversationID, time.Second*30*60, getConversation)
|
||||
if err != nil {
|
||||
return nil, utils.Wrap(err, "Fetch failed")
|
||||
}
|
||||
conversation := db.Conversation{}
|
||||
err = json.Unmarshal([]byte(conversationStr), &conversation)
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user