kick group invite group update

This commit is contained in:
Gordon
2022-04-21 16:46:48 +08:00
committed by Xinwei Xiong(cubxxw-openim)
parent 541dacd293
commit f0aa679b6d
3 changed files with 169 additions and 6 deletions
@@ -384,7 +384,7 @@ func GetConversation(OwnerUserID, conversationID string) (db.Conversation, error
err = dbConn.Model(&db.Conversation{
OwnerUserID: OwnerUserID,
ConversationID: conversationID,
}).Find(&conversation).Error
}).Take(&conversation).Error
return conversation, err
}
@@ -397,3 +397,12 @@ func GetConversations(OwnerUserID string, conversationIDs []string) ([]db.Conver
err = dbConn.Model(&db.Conversation{}).Where("conversation_id IN (?) and owner_user_id=?", conversationIDs, OwnerUserID).Find(&conversations).Error
return conversations, err
}
func GetConversationsByConversationIDMultipleOwner(OwnerUserIDList []string, conversationID string) ([]db.Conversation, error) {
var conversations []db.Conversation
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return conversations, err
}
err = dbConn.Model(&db.Conversation{}).Where("owner_user_id IN (?) and conversation_id=?", OwnerUserIDList, conversationID).Find(&conversations).Error
return conversations, err
}