mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-10-26 21:22:16 +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") | 			return "", utils.Wrap(err, "get failed") | ||||||
| 		} | 		} | ||||||
| 		bytes, err := json.Marshal(conversation) | 		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) | 	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{} | 	conversation := db.Conversation{} | ||||||
| 	err = json.Unmarshal([]byte(conversationStr), &conversation) | 	err = json.Unmarshal([]byte(conversationStr), &conversation) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user