Compare commits

...

26 Commits

Author SHA1 Message Date
Xinwei Xiong dabe7c2813 Merge pull request #2177 from openimsdk/cubxxw-patch-2
update release-v3.1  images
2024-04-10 19:51:14 +08:00
Xinwei Xiong fcf67d40cd Update README.md 2024-04-10 19:47:00 +08:00
OpenIM Robot ca6b46c4ff Merge pull request #1210 from openimsdk/fix/makefile
fix(release-v3.1): fix makefile go version update image
2023-10-13 11:46:52 +08:00
Xinwei Xiong 35d6b7503c fix: fix makefile go version update image 2023-10-13 10:38:05 +08:00
Xinwei Xiong ce3816cfc4 Update docker-compose.yaml (#868) 2023-08-15 14:35:33 +08:00
Xinwei Xiong 45a5661d2e Update golang.mk (#823) 2023-08-09 10:54:08 +08:00
Gordon 383ae8e47e refactor: log change
Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>
2023-08-07 19:51:06 +08:00
skiffer-git baa6c18f93 fix: adjust the order: first replace the values in the .env file, then replace the configuration in the config file 2023-07-29 22:03:33 +08:00
skiffer-git 25671158a4 fix: adjust the order: first replace the values in the .env file, then replace the configuration in the config file 2023-07-29 21:59:31 +08:00
skiffer-git 923023271a fix: adjust the order: first replace the values in the .env file, then replace the configuration in the config file 2023-07-29 21:55:54 +08:00
Xinwei Xiong 0feb950c5a fix: docker images (#702)
Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
2023-07-29 13:01:17 +08:00
skiffer-git 1e2d175c67 synchronize the image and tag name of chat 2023-07-28 22:37:35 +08:00
skiffer-git 28177654c7 restore the IP in the env to 127.0.0.1 2023-07-28 22:19:05 +08:00
skiffer-git baae864903 synchronize the image and tag name of open-im-server 2023-07-28 22:14:14 +08:00
WangchuXiao ce752f7a00 Merge pull request #697 from wangchuxiao-dev/dev2
fix bug: join group failed
2023-07-28 20:24:37 +08:00
wangchuxiao a73d8fe4f6 fix bug: join group failed 2023-07-28 20:21:40 +08:00
WangchuXiao 6713c4df52 Merge pull request #695 from wangchuxiao-dev/dev2
Dev2
2023-07-28 20:17:51 +08:00
wangchuxiao c9c698551b fix bug: join group failed 2023-07-28 20:16:32 +08:00
wangchuxiao e868073543 Merge remote-tracking branch 'upstream/main' into dev2 2023-07-28 20:16:19 +08:00
Xinwei Xiong(cubxxw-openim) 5eb97766b6 feat: add go relase
Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
2023-07-27 20:45:01 +08:00
wangchuxiao 340ce42b17 fix bug: reject group req bug 2023-07-27 20:27:05 +08:00
Xinwei Xiong(cubxxw-openim) e9f5752e29 feat: add test
Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
2023-07-27 16:27:43 +08:00
Xinwei Xiong(cubxxw-openim) c509f7d4d2 feat: add test
Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
2023-07-27 16:16:13 +08:00
Xinwei Xiong(cubxxw-openim) 692ff29a0c feat: add script yaml
Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
2023-07-27 15:51:57 +08:00
Xinwei Xiong(cubxxw-openim) de641f574c feat: add script yaml
Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
2023-07-27 15:36:24 +08:00
Xinwei Xiong(cubxxw-openim) 57374a4df4 docs: add readme docs
Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
2023-07-27 15:36:24 +08:00
11 changed files with 47 additions and 23 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
USER=root
PASSWORD=openIM123
MINIO_ENDPOINT=http://113.99.98.99:10005
API_URL=http://113.99.98.99:10002/object/
MINIO_ENDPOINT=http://127.0.0.1:10005
API_URL=http://127.0.0.1:10002/object/
DATA_DIR=./
+2 -2
View File
@@ -23,7 +23,7 @@ RUN /bin/sh -c "make build"
FROM alpine
RUN echo "https://mirrors.aliyun.com/alpine/v3.4/main" > /etc/apk/repositories && \
apk --no-cache add tzdata ca-certificates
apk --no-cache add tzdata ca-certificates bash
# Set directory to map logs, config files, scripts, and SDK
VOLUME ["/Open-IM-Server/logs", "/Open-IM-Server/config", "/Open-IM-Server/scripts", "/Open-IM-Server/db/sdk"]
@@ -34,4 +34,4 @@ COPY --from=builder /Open-IM-Server/_output/bin/platforms/linux/amd64 /Open-IM-S
WORKDIR /Open-IM-Server/scripts
CMD ["docker_start_all.sh"]
CMD ["./docker_start_all.sh"]
-1
View File
@@ -8,7 +8,6 @@
⭐️ Open source Instant Messaging Server ⭐️ <br>
<h3>
<p align=center>
<a href="https://goreportcard.com/report/github.com/OpenIMSDK/Open-IM-Server"><img src="https://goreportcard.com/badge/github.com/OpenIMSDK/Open-IM-Server" alt="A+"></a>
<a href="https://github.com/OpenIMSDK/Open-IM-Server/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22"><img src="https://img.shields.io/github/issues/OpenIMSDK/Open-IM-Server/good%20first%20issue?logo=%22github%22" alt="good first"></a>
+2 -2
View File
@@ -100,7 +100,7 @@ services:
openim_server:
image: ghcr.io/openimsdk/openim-server:v3.0
image: ghcr.io/openimsdk/openim-server:release-v3.1
container_name: openim-server
volumes:
- ./logs:/Open-IM-Server/logs
@@ -124,7 +124,7 @@ services:
max-file: "2"
openim_chat:
image: ghcr.io/openimsdk/openim-chat:v1.0.0
image: ghcr.io/openimsdk/openim-chat:v1.1.1
container_name: openim_chat
restart: always
depends_on:
+13 -1
View File
@@ -39,7 +39,13 @@ type Req struct {
}
func (r *Req) String() string {
return utils.StructToJsonString(r)
var tReq Req
tReq.ReqIdentifier = r.ReqIdentifier
tReq.Token = r.Token
tReq.SendID = r.SendID
tReq.OperationID = r.OperationID
tReq.MsgIncr = r.MsgIncr
return utils.StructToJsonString(tReq)
}
type Resp struct {
@@ -52,6 +58,12 @@ type Resp struct {
}
func (r *Resp) String() string {
var tResp Resp
tResp.ReqIdentifier = r.ReqIdentifier
tResp.MsgIncr = r.MsgIncr
tResp.OperationID = r.OperationID
tResp.ErrCode = r.ErrCode
tResp.ErrMsg = r.ErrMsg
return utils.StructToJsonString(r)
}
+1 -1
View File
@@ -1040,7 +1040,7 @@ func (s *groupServer) GetUserReqApplicationList(ctx context.Context, req *pbGrou
groupIDs := utils.Distinct(utils.Slice(requests, func(e *relationTb.GroupRequestModel) string {
return e.GroupID
}))
groups, err := s.GroupDatabase.FindGroup(ctx, groupIDs)
groups, err := s.GroupDatabase.FindNotDismissedGroup(ctx, groupIDs)
if err != nil {
return nil, err
}
+5
View File
@@ -39,6 +39,7 @@ type GroupDatabase interface {
CreateGroup(ctx context.Context, groups []*relationTb.GroupModel, groupMembers []*relationTb.GroupMemberModel) error
TakeGroup(ctx context.Context, groupID string) (group *relationTb.GroupModel, err error)
FindGroup(ctx context.Context, groupIDs []string) (groups []*relationTb.GroupModel, err error)
FindNotDismissedGroup(ctx context.Context, groupIDs []string) (groups []*relationTb.GroupModel, err error)
SearchGroup(
ctx context.Context,
keyword string,
@@ -581,3 +582,7 @@ func (g *groupDatabase) CountRangeEverydayTotal(ctx context.Context, start time.
func (g *groupDatabase) FindGroupRequests(ctx context.Context, groupID string, userIDs []string) (int64, []*relationTb.GroupRequestModel, error) {
return g.groupRequestDB.FindGroupRequests(ctx, groupID, userIDs)
}
func (g *groupDatabase) FindNotDismissedGroup(ctx context.Context, groupIDs []string) (groups []*relationTb.GroupModel, err error) {
return g.groupDB.FindNotDismissedGroup(ctx, groupIDs)
}
+4
View File
@@ -99,3 +99,7 @@ func (g *GroupGorm) CountRangeEverydayTotal(ctx context.Context, start time.Time
}
return v, nil
}
func (g *GroupGorm) FindNotDismissedGroup(ctx context.Context, groupIDs []string) (groups []*relation.GroupModel, err error) {
return groups, utils.Wrap(g.DB.Where("group_id in (?) and status != ?", groupIDs, constant.GroupStatusDismissed).Find(&groups).Error, "")
}
+1
View File
@@ -51,6 +51,7 @@ type GroupModelInterface interface {
UpdateMap(ctx context.Context, groupID string, args map[string]interface{}) (err error)
UpdateStatus(ctx context.Context, groupID string, status int32) (err error)
Find(ctx context.Context, groupIDs []string) (groups []*GroupModel, err error)
FindNotDismissedGroup(ctx context.Context, groupIDs []string) (groups []*GroupModel, err error)
Take(ctx context.Context, groupID string) (group *GroupModel, err error)
Search(
ctx context.Context,
+15 -12
View File
@@ -37,12 +37,24 @@ function onCtrlC () {
exit 1
}
# Load environment variables from .env file
source ${OPENIM_ROOT}/.env
# Get the public internet IP address
internet_ip=$(curl ifconfig.me -s)
echo -e "${PURPLE_PREFIX}=========> Your public internet IP address is ${internet_ip} ${COLOR_SUFFIX} \n"
# Load environment variables from .env file
source ${OPENIM_ROOT}/.env
# Replace local IP address with the public IP address in .env file
if [ $API_URL == "http://127.0.0.1:10002/object/" ]; then
sed -i "s/127.0.0.1/${internet_ip}/" ${OPENIM_ROOT}/.env
fi
if [ $MINIO_ENDPOINT == "http://127.0.0.1:10005" ]; then
sed -i "s/127.0.0.1/${internet_ip}/" ${OPENIM_ROOT}/.env
fi
echo -e "${PURPLE_PREFIX}=========> Your minio endpoint is ${MINIO_ENDPOINT} ${COLOR_SUFFIX} \n"
@@ -59,15 +71,6 @@ echo -e "${PURPLE_PREFIX}=========> env_check.sh ${COLOR_SUFFIX} \n"
${SCRIPTS_ROOT}/env_check.sh
# Replace local IP address with the public IP address in .env file
if [ $API_URL == "http://127.0.0.1:10002/object/" ]; then
sed -i "s/127.0.0.1/${internet_ip}/" ${OPENIM_ROOT}/.env
fi
if [ $MINIO_ENDPOINT == "http://127.0.0.1:10005" ]; then
sed -i "s/127.0.0.1/${internet_ip}/" ${OPENIM_ROOT}/.env
fi
# Go back to the previous directory
cd ${OPENIM_ROOT}
@@ -79,4 +82,4 @@ else
docker compose up -d
fi
${SCRIPTS_ROOT}/docker_check_service.sh
${SCRIPTS_ROOT}/docker_check_service.sh
+2 -2
View File
@@ -17,7 +17,7 @@
#
GO := go
GO_SUPPORTED_VERSIONS ?= 1.18|1.19|1.20
GO_SUPPORTED_VERSIONS ?= 1.18|1.19|1.20|1.21
GO_LDFLAGS += -X $(VERSION_PACKAGE).gitVersion=$(GIT_TAG) \
-X $(VERSION_PACKAGE).gitCommit=$(GIT_COMMIT) \
@@ -204,4 +204,4 @@ go.clean:
## copyright.help: Show copyright help
.PHONY: go.help
go.help: scripts/make-rules/golang.mk
$(call smallhelp)
$(call smallhelp)