Skip to content

Commit 18c7e23

Browse files
authored
Merge branch 'main' into changelog-v3.8.3-patch.4
2 parents ddd16af + 359201a commit 18c7e23

File tree

148 files changed

+4830
-1530
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+4830
-1530
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ MONGO_IMAGE=mongo:7.0
22
REDIS_IMAGE=redis:7.0.0
33
KAFKA_IMAGE=bitnami/kafka:3.5.1
44
MINIO_IMAGE=minio/minio:RELEASE.2024-01-11T07-46-16Z
5-
ETCD_IMAGE=quay.io/coreos/etcd:v3.5.13
5+
ETCD_IMAGE=bitnami/etcd:3.5.13
66
PROMETHEUS_IMAGE=prom/prometheus:v2.45.6
77
ALERTMANAGER_IMAGE=prom/alertmanager:v0.27.0
88
GRAFANA_IMAGE=grafana/grafana:11.0.1

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ contact_links:
44
# description: "Report a bug in the project"
55
# file: "bug-report.yml"
66
- name: 📢 Connect on slack
7-
url: https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg
7+
url: https://join.slack.com/t/openimsdk/shared_invite/zt-2ijy1ys1f-O0aEDCr7ExRZ7mwsHAVg9A
88
about: Support OpenIM-related requests or issues, get in touch with developers and help on slack
99
- name: 🌐 OpenIM Blog
1010
url: https://www.openim.io/

.github/ISSUE_TEMPLATE/other.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ title: "[Other]: <give this problem a name>"
44
labels: ["other"]
55
# assignees: []
66

7-
87
body:
98
- type: markdown
109
attributes:
@@ -26,5 +25,5 @@ body:
2625
- type: markdown
2726
attributes:
2827
value: |
29-
You can also join our Discord community [here](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg)
28+
You can also join our Discord community [here](https://join.slack.com/t/openimsdk/shared_invite/zt-2ijy1ys1f-O0aEDCr7ExRZ7mwsHAVg9A)
3029
Feel free to check out other cool repositories of the openim Community [here](https://github.com/openimsdk)

.github/workflows/auto-invite-comment.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
permissions:
1212
issues: write
1313
steps:
14-
1514
- name: Invite user to join OpenIM Community
1615
uses: peter-evans/create-or-update-comment@v4
1716
with:
@@ -20,11 +19,11 @@ jobs:
2019
body: |
2120
We value close connections with our users, developers, and contributors here at Open-IM-Server. With a large community and maintainer team, we're always here to help and support you. Whether you're looking to join our community or have any questions or suggestions, we welcome you to get in touch with us.
2221
23-
Our most recommended way to get in touch is through [Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q). Even if you're in China, Slack is usually not blocked by firewalls, making it an easy way to connect with us. Our Slack community is the ideal place to discuss and share ideas and suggestions with other users and developers of Open-IM-Server. You can ask technical questions, seek help, or share your experiences with other users of Open-IM-Server.
24-
22+
Our most recommended way to get in touch is through [Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-2ijy1ys1f-O0aEDCr7ExRZ7mwsHAVg9A). Even if you're in China, Slack is usually not blocked by firewalls, making it an easy way to connect with us. Our Slack community is the ideal place to discuss and share ideas and suggestions with other users and developers of Open-IM-Server. You can ask technical questions, seek help, or share your experiences with other users of Open-IM-Server.
23+
2524
In addition to Slack, we also offer the following ways to get in touch:
26-
27-
+ <a href="https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q" target="_blank"><img src="https://img.shields.io/badge/Slack-OpenIM%2B-blueviolet?logo=slack&amp;logoColor=white"></a> We also have Slack channels for you to communicate and discuss. To join, visit https://slack.com/ and join our [👀 Open-IM-Server slack](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) team channel.
25+
26+
+ <a href="https://join.slack.com/t/openimsdk/shared_invite/zt-2ijy1ys1f-O0aEDCr7ExRZ7mwsHAVg9A" target="_blank"><img src="https://img.shields.io/badge/Slack-OpenIM%2B-blueviolet?logo=slack&amp;logoColor=white"></a> We also have Slack channels for you to communicate and discuss. To join, visit https://slack.com/ and join our [👀 Open-IM-Server slack](https://join.slack.com/t/openimsdk/shared_invite/zt-2ijy1ys1f-O0aEDCr7ExRZ7mwsHAVg9A) team channel.
2827
+ <a href="https://mail.google.com/mail/u/0/?fs=1&tf=cm&[email protected]" target="_blank"><img src="https://img.shields.io/badge/gmail-%40OOpenIMSDKCore?style=social&logo=gmail"></a> Get in touch with us on [Gmail](https://mail.google.com/mail/u/0/?fs=1&tf=cm&[email protected]). If you have any questions or issues that need resolving, or any suggestions and feedback for our open source projects, please feel free to contact us via email.
2928
+ <a href="https://doc.rentsoft.cn/" target="_blank"><img src="https://img.shields.io/badge/%E5%8D%9A%E5%AE%A2-%40OpenIMSDKCore-blue?style=social&logo=Octopus%20Deploy"></a> Read our [blog](https://doc.rentsoft.cn/). Our blog is a great place to stay up-to-date with Open-IM-Server projects and trends. On the blog, we share our latest developments, tech trends, and other interesting information.
3029
+ <a href="https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg" target="_blank"><img src="https://img.shields.io/badge/%E5%BE%AE%E4%BF%A1-OpenIMSDKCore-brightgreen?logo=wechat&style=flat-square"></a> Add [Wechat](https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg) and indicate that you are a user or developer of Open-IM-Server. We will process your request as soon as possible.
@@ -36,4 +35,4 @@ jobs:
3635
# issue-number: ${{ github.event.issue.number }}
3736
# comment: 🤖 Auto-closing issue, if you still need help please reopen the issue or ask for help in the community above
3837
# labels: |
39-
# accepted
38+
# accepted

.github/workflows/go-build-test.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ jobs:
1212
go-build:
1313
name: Test with go ${{ matrix.go_version }} on ${{ matrix.os }}
1414
runs-on: ${{ matrix.os }}
15+
16+
env:
17+
SHARE_CONFIG_PATH: config/share.yml
18+
1519
permissions:
1620
contents: write
1721
pull-requests: write
@@ -40,6 +44,10 @@ jobs:
4044
with:
4145
compose-file: "./docker-compose.yml"
4246

47+
- name: Modify Server Configuration
48+
run: |
49+
yq e '.secret = 123456' -i ${{ env.SHARE_CONFIG_PATH }}
50+
4351
# - name: Get Internal IP Address
4452
# id: get-ip
4553
# run: |
@@ -71,6 +79,11 @@ jobs:
7179
go mod download
7280
go install github.com/magefile/mage@latest
7381
82+
- name: Modify Chat Configuration
83+
run: |
84+
cd ${{ github.workspace }}/chat-repo
85+
yq e '.openIM.secret = 123456' -i ${{ env.SHARE_CONFIG_PATH }}
86+
7487
- name: Build and test Chat Services
7588
run: |
7689
cd ${{ github.workspace }}/chat-repo
@@ -132,7 +145,7 @@ jobs:
132145
133146
# Test get admin token
134147
get_admin_token_response=$(curl -X POST -H "Content-Type: application/json" -H "operationID: imAdmin" -d '{
135-
"secret": "openIM123",
148+
"secret": "123456",
136149
"platformID": 2,
137150
"userID": "imAdmin"
138151
}' http://127.0.0.1:10002/auth/get_admin_token)
@@ -169,7 +182,8 @@ jobs:
169182
contents: write
170183
env:
171184
SDK_DIR: openim-sdk-core
172-
CONFIG_PATH: config/notification.yml
185+
NOTIFICATION_CONFIG_PATH: config/notification.yml
186+
SHARE_CONFIG_PATH: config/share.yml
173187

174188
strategy:
175189
matrix:
@@ -184,7 +198,7 @@ jobs:
184198
uses: actions/checkout@v4
185199
with:
186200
repository: "openimsdk/openim-sdk-core"
187-
ref: "release-v3.8"
201+
ref: "main"
188202
path: ${{ env.SDK_DIR }}
189203

190204
- name: Set up Go ${{ matrix.go_version }}
@@ -199,8 +213,9 @@ jobs:
199213
200214
- name: Modify Server Configuration
201215
run: |
202-
yq e '.groupCreated.isSendMsg = true' -i ${{ env.CONFIG_PATH }}
203-
yq e '.friendApplicationApproved.isSendMsg = true' -i ${{ env.CONFIG_PATH }}
216+
yq e '.groupCreated.isSendMsg = true' -i ${{ env.NOTIFICATION_CONFIG_PATH }}
217+
yq e '.friendApplicationApproved.isSendMsg = true' -i ${{ env.NOTIFICATION_CONFIG_PATH }}
218+
yq e '.secret = 123456' -i ${{ env.SHARE_CONFIG_PATH }}
204219
205220
- name: Start Server Services
206221
run: |

.github/workflows/help-comment-issue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ jobs:
3232
token: ${{ secrets.BOT_TOKEN }}
3333
body: |
3434
This issue is available for anyone to work on. **Make sure to reference this issue in your pull request.** :sparkles: Thank you for your contribution! :sparkles:
35-
[Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) to connect and communicate with our developers.
35+
[Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-2ijy1ys1f-O0aEDCr7ExRZ7mwsHAVg9A) to connect and communicate with our developers.
3636
If you wish to accept this assignment, please leave a comment in the comments section: `/accept`.🎯

.github/workflows/merge-from-milestone.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,27 @@ jobs:
155155
'{title: $title, head: $head, base: $base, body: $body}')")
156156
157157
new_pr_number=$(echo "$response" | jq -r '.number')
158-
echo "Created PR #$new_pr_number"
159158
160-
curl -s -X POST -H "Authorization: token $GITHUB_TOKEN" \
159+
if [[ "$new_pr_number" == "null" || -z "$new_pr_number" ]]; then
160+
echo "Failed to create PR. Response: $response"
161+
162+
git checkout $TARGET_BRANCH
163+
164+
git branch -D $cherry_pick_branch
165+
166+
echo "Deleted branch: $cherry_pick_branch"
167+
git push origin --delete $cherry_pick_branch
168+
else
169+
echo "Created PR #$new_pr_number"
170+
171+
curl -s -X POST -H "Authorization: token $GITHUB_TOKEN" \
161172
-H "Accept: application/vnd.github+json" \
162173
-d '{"labels": ["milestone-merge"]}' \
163174
"https://api.github.com/repos/${{ github.repository }}/issues/$new_pr_number/labels"
175+
fi
176+
177+
echo ""
178+
echo "----------------------------------------"
179+
echo ""
164180
fi
165181
done

.github/workflows/update-version-file-on-release.yml

Lines changed: 68 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,40 @@ jobs:
88
update-version:
99
runs-on: ubuntu-latest
1010
env:
11-
TAG_VERSION: ${{ github.event.release.tag_name }}
11+
TAG_VERSION: ${{ github.event.release.tag_name }}
1212
steps:
1313
# Step 1: Checkout the original repository's code
1414
- name: Checkout code
1515
uses: actions/checkout@v4
1616
with:
1717
fetch-depth: 0
18+
# submodules: "recursive"
19+
20+
- name: Safe submodule initialization
21+
run: |
22+
echo "Checking for submodules..."
23+
if [ -f .gitmodules ]; then
24+
if [ -s .gitmodules ]; then
25+
echo "Initializing submodules..."
26+
if git submodule sync --recursive 2>/dev/null; then
27+
git submodule update --init --force --recursive || {
28+
echo "Warning: Some submodules failed to initialize, continuing anyway..."
29+
}
30+
else
31+
echo "Warning: Submodule sync failed, continuing without submodules..."
32+
fi
33+
else
34+
echo ".gitmodules exists but is empty, skipping submodule initialization"
35+
fi
36+
else
37+
echo "No .gitmodules file found, no submodules to initialize"
38+
fi
1839
1940
# Step 2: Set up Git with official account
2041
- name: Set up Git
2142
run: |
22-
git config user.name "github-actions[bot]"
23-
git config user.email "github-actions[bot]@users.noreply.github.com"
43+
git config --global user.name "github-actions[bot]"
44+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
2445
2546
# Step 3: Check and delete existing tag
2647
- name: Check and delete existing tag
@@ -33,7 +54,8 @@ jobs:
3354
# Step 4: Update version file
3455
- name: Update version file
3556
run: |
36-
echo "${{ env.TAG_VERSION }}" > version/version
57+
mkdir -p version
58+
echo -n "${{ env.TAG_VERSION }}" > version/version
3759
3860
# Step 5: Commit and push changes
3961
- name: Commit and push changes
@@ -42,43 +64,56 @@ jobs:
4264
run: |
4365
git add version/version
4466
git commit -m "Update version to ${{ env.TAG_VERSION }}"
45-
git push origin HEAD:${{ github.ref }}
4667
47-
# Step 6: Create and push tag
48-
- name: Create and push tag
49-
env:
50-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
# Step 6: Update tag
69+
- name: Update tag
5170
run: |
52-
git tag ${{ env.TAG_VERSION }}
53-
git push origin ${{ env.TAG_VERSION }}
71+
git tag -fa ${{ env.TAG_VERSION }} -m "Update version to ${{ env.TAG_VERSION }}"
72+
git push origin ${{ env.TAG_VERSION }} --force
5473
5574
# Step 7: Find and Publish Draft Release
5675
- name: Find and Publish Draft Release
57-
uses: actions/github-script@v6
76+
uses: actions/github-script@v7
5877
with:
5978
github-token: ${{ secrets.GITHUB_TOKEN }}
6079
script: |
61-
// Get the list of releases
62-
const releases = await github.rest.repos.listReleases({
63-
owner: context.repo.owner,
64-
repo: context.repo.repo
65-
});
66-
67-
// Find the draft release where the title and tag_name are the same
68-
const draftRelease = releases.data.find(release =>
69-
release.draft && release.name === release.tag_name
70-
);
80+
const { owner, repo } = context.repo;
81+
const tagName = process.env.TAG_VERSION;
7182
72-
if (draftRelease) {
73-
// Publish the draft release using the release_id
83+
try {
84+
let release;
85+
try {
86+
const response = await github.rest.repos.getReleaseByTag({
87+
owner,
88+
repo,
89+
tag: tagName
90+
});
91+
release = response.data;
92+
} catch (tagError) {
93+
core.info(`Release not found by tag, searching all releases...`);
94+
const releases = await github.rest.repos.listReleases({
95+
owner,
96+
repo,
97+
per_page: 100
98+
});
99+
100+
release = releases.data.find(r => r.draft && r.tag_name === tagName);
101+
if (!release) {
102+
throw new Error(`No release found with tag ${tagName}`);
103+
}
104+
}
105+
74106
await github.rest.repos.updateRelease({
75-
owner: context.repo.owner,
76-
repo: context.repo.repo,
77-
release_id: draftRelease.id, // Use release_id
78-
draft: false
107+
owner,
108+
repo,
109+
release_id: release.id,
110+
draft: false,
111+
prerelease: release.prerelease
79112
});
80-
81-
core.info(`Draft Release ${draftRelease.tag_name} published successfully.`);
82-
} else {
83-
core.info("No matching draft release found.");
84-
}
113+
114+
const status = release.draft ? "was draft" : "was already published";
115+
core.info(`Release ${tagName} ensured to be published (${status}).`);
116+
117+
} catch (error) {
118+
core.warning(`Could not find or update release for tag ${tagName}: ${error.message}`);
119+
}

.github/workflows/user-first-interaction.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ jobs:
1717
repo-token: ${{ secrets.BOT_TOKEN }}
1818
pr-message: |
1919
Hello! Thank you for your contribution.
20-
20+
2121
If you are fixing a bug, please reference the issue number in the description.
2222
2323
If you are implementing a feature request, please check with the maintainers that the feature will be accepted first.
2424
25-
[Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) to connect and communicate with our developers.
25+
[Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-2ijy1ys1f-O0aEDCr7ExRZ7mwsHAVg9A) to connect and communicate with our developers.
2626
2727
Please leave your information in the [✨ discussions](https://github.com/orgs/OpenIMSDK/discussions/426), we expect anyone to join OpenIM developer community.
2828
2929
issue-message: |
3030
Hello! Thank you for filing an issue.
3131
3232
If this is a bug report, please include relevant logs to help us debug the problem.
33-
34-
[Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) to connect and communicate with our developers.
35-
continue-on-error: true
33+
34+
[Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-2ijy1ys1f-O0aEDCr7ExRZ7mwsHAVg9A) to connect and communicate with our developers.
35+
continue-on-error: true

.golangci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ run:
2828
# - util
2929
# - .*~
3030
# - api/swagger/docs
31+
32+
3133
# - server/docs
3234
# - components/mnt/config/certs
3335
# - logs

0 commit comments

Comments
 (0)