mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-07-02 16:18:14 +08:00
Merge branch 'OpenIMSDK:main' into main
This commit is contained in:
commit
7eb4b36de6
@ -182,7 +182,7 @@ We take notes of each [biweekly meeting](https://github.com/OpenIMSDK/Open-IM-Se
|
||||
## Who are using Open-IM-Server
|
||||
The [user case studies](https://github.com/OpenIMSDK/community/blob/main/ADOPTERS.md) page includes the user list of the project. You can leave a [📝comment](https://github.com/OpenIMSDK/Open-IM-Server/issues/379) to let us know your use case.
|
||||
|
||||

|
||||

|
||||
|
||||
## License
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ services:
|
||||
|
||||
|
||||
openim_server:
|
||||
image: ghcr.io/openimsdk/openim-server:v3.0.1
|
||||
image: ghcr.io/openimsdk/openim-server:v3.0
|
||||
container_name: openim-server
|
||||
volumes:
|
||||
- ./logs:/Open-IM-Server/logs
|
||||
@ -123,7 +123,7 @@ services:
|
||||
max-file: "2"
|
||||
|
||||
openim_chat:
|
||||
image: openim/openim_chat:v1.1.0
|
||||
image: ghcr.io/openimsdk/openim-chat:v1.0.0
|
||||
container_name: openim_chat
|
||||
restart: always
|
||||
depends_on:
|
||||
|
||||
7
init_docker.sh
Normal file → Executable file
7
init_docker.sh
Normal file → Executable file
@ -21,7 +21,12 @@ if ! command -v docker >/dev/null 2>&1; then
|
||||
fi
|
||||
|
||||
# Start Docker services using docker-compose
|
||||
docker-compose up -d
|
||||
if command -v docker-compose &> /dev/null
|
||||
then
|
||||
docker-compose up -d
|
||||
else
|
||||
docker compose up -d
|
||||
fi
|
||||
|
||||
# Move back to the 'scripts' folder
|
||||
cd scripts
|
||||
|
||||
0
install_guide.sh
Normal file → Executable file
0
install_guide.sh
Normal file → Executable file
0
install_im_compose.sh
Normal file → Executable file
0
install_im_compose.sh
Normal file → Executable file
0
install_im_server.sh
Normal file → Executable file
0
install_im_server.sh
Normal file → Executable file
@ -104,7 +104,7 @@ func (c *conversationDatabase) SetUsersConversationFiledTx(ctx context.Context,
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
cache = cache.DelConversationIDs(NotUserIDs...).DelUserConversationIDsHash(NotUserIDs...).DelConvsersations(conversation.ConversationID, NotUserIDs...)
|
||||
cache = cache.DelConversationIDs(NotUserIDs...).DelUserConversationIDsHash(NotUserIDs...).DelConversations(conversation.ConversationID, NotUserIDs...)
|
||||
}
|
||||
return nil
|
||||
}); err != nil {
|
||||
@ -128,7 +128,7 @@ func (c *conversationDatabase) CreateConversation(ctx context.Context, conversat
|
||||
var userIDs []string
|
||||
cache := c.cache.NewCache()
|
||||
for _, conversation := range conversations {
|
||||
cache = cache.DelConvsersations(conversation.OwnerUserID, conversation.ConversationID)
|
||||
cache = cache.DelConversations(conversation.OwnerUserID, conversation.ConversationID)
|
||||
userIDs = append(userIDs, conversation.OwnerUserID)
|
||||
}
|
||||
return cache.DelConversationIDs(userIDs...).DelUserConversationIDsHash(userIDs...).ExecDel(ctx)
|
||||
@ -190,7 +190,7 @@ func (c *conversationDatabase) SetUserConversations(ctx context.Context, ownerUs
|
||||
var conversationIDs []string
|
||||
for _, conversation := range conversations {
|
||||
conversationIDs = append(conversationIDs, conversation.ConversationID)
|
||||
cache = cache.DelConvsersations(conversation.OwnerUserID, conversation.ConversationID)
|
||||
cache = cache.DelConversations(conversation.OwnerUserID, conversation.ConversationID)
|
||||
}
|
||||
conversationTx := c.conversationDB.NewTx(tx)
|
||||
existConversations, err := conversationTx.Find(ctx, ownerUserID, conversationIDs)
|
||||
@ -247,7 +247,7 @@ func (c *conversationDatabase) CreateGroupChatConversation(ctx context.Context,
|
||||
for _, v := range notExistUserIDs {
|
||||
conversation := relationTb.ConversationModel{ConversationType: constant.SuperGroupChatType, GroupID: groupID, OwnerUserID: v, ConversationID: conversationID}
|
||||
conversations = append(conversations, &conversation)
|
||||
cache = cache.DelConvsersations(v, conversationID)
|
||||
cache = cache.DelConversations(v, conversationID)
|
||||
}
|
||||
cache = cache.DelConversationIDs(notExistUserIDs...).DelUserConversationIDsHash(notExistUserIDs...)
|
||||
if len(conversations) > 0 {
|
||||
@ -261,7 +261,7 @@ func (c *conversationDatabase) CreateGroupChatConversation(ctx context.Context,
|
||||
return err
|
||||
}
|
||||
for _, v := range existConversationUserIDs {
|
||||
cache = cache.DelConvsersations(v, conversationID)
|
||||
cache = cache.DelConversations(v, conversationID)
|
||||
}
|
||||
return nil
|
||||
}); err != nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user