Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] wildfirechat from wildfirechat:wildfirechat #1

Open
wants to merge 900 commits into
base: wildfirechat
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
900 commits
Select commit Hold shift + click to select a range
0e6e23d
更新版本号和release note
Oct 6, 2022
b8967cc
update commons-codec:commons-codec 1.10 to 1.13
Huoxi-any Oct 12, 2022
ba01c90
Merge pull request #544 from ren-jq101/oscs_fix_cd3626oau51of7vbl0vg
heavyrain2012 Oct 12, 2022
2724c79
Merge pull request #363 from wildfirechat/dependabot/maven/broker/com…
heavyrain2012 Oct 12, 2022
adb4f08
Merge pull request #364 from wildfirechat/dependabot/maven/sdk/common…
heavyrain2012 Oct 12, 2022
e1a8a04
Merge pull request #381 from wildfirechat/dependabot/maven/sdk/org.ap…
heavyrain2012 Oct 12, 2022
898c4f2
Merge pull request #379 from wildfirechat/dependabot/maven/broker/org…
heavyrain2012 Oct 12, 2022
a2d4bf7
http回调失败用error打印日志
Oct 12, 2022
0f9df06
名片消息推送
imndx Oct 18, 2022
b141990
应用平台的部分错误日志改成error级别
Oct 20, 2022
a4eb64e
添加配置注释说明
Oct 20, 2022
8e1d56b
添加service运行方式
Oct 21, 2022
34bd59f
打包输出deb包
Oct 21, 2022
c0840f3
添加RPM打包方式
Oct 21, 2022
b5d884f
优化deb和rpm包
Oct 21, 2022
5e1f4fe
update systectl service readme
Oct 21, 2022
ffaffc8
update systemctl service file
Oct 21, 2022
d9eccd3
update readme
Oct 22, 2022
9be49c3
update readme
Oct 22, 2022
6048748
更新readme
Oct 22, 2022
6acb1c9
添加h2db路径的配置
Oct 23, 2022
bd2b037
删除旧的好友欢迎语的多语言处理方式
Oct 23, 2022
893b58c
update dockerfile
Oct 23, 2022
6e570c7
更新docker说明
Oct 23, 2022
acd21fa
优化野火IM服务安装目录
Oct 24, 2022
50f0330
解决版本信息错误问题
Oct 24, 2022
2bed06c
更新升级说明
Oct 24, 2022
771a4d7
version 0.97 and release note
Oct 24, 2022
ae3eb9c
linux 多端登录处理错误
imndx Oct 25, 2022
d4c6b1f
update release note
Oct 25, 2022
3ca7c70
add screenshots
Oct 26, 2022
66c67fa
pc 截图大小
Oct 26, 2022
a71b8ce
add more screenshots
Oct 26, 2022
cbc1509
update screenshots
Oct 26, 2022
4c00955
更新readme
Oct 27, 2022
731020b
update readme
Oct 27, 2022
b8d8d2f
群组成员表添加成员索引和获取2个人共同群组的接口
Oct 28, 2022
b233c49
解决字符编码错误问题
Nov 1, 2022
9b0b644
update version and release note
Nov 1, 2022
1ef8f94
忽略掉无效的请求和日志
Nov 5, 2022
6b7edc7
API获取用户信息时,过滤掉被删除的用户
Nov 9, 2022
45f9e20
支持转发消息include/exclude类型,支持配置消息区间
Nov 12, 2022
67234ce
添加新的群组类型:组织群
Nov 12, 2022
b2eab28
组织群客户端不能自主退出
Nov 12, 2022
1275b21
fix build error
Nov 12, 2022
7080d85
只有server api才能创建组织群
Nov 12, 2022
b2ee8b8
linux安装包创建日志目录
Nov 12, 2022
77e742e
添加server sdk检查server api的工具
Nov 12, 2022
ae8d63b
update docker readme
Nov 14, 2022
d706f54
解决启动脚本中的小错误
Nov 14, 2022
0b6612e
内置对象存储支持绝对路径和相对路径
Nov 14, 2022
8819918
当禁止陌生人聊天时,添加例外允许用户id,用于比如管理员、文件助手等场景
Nov 14, 2022
90504d1
打包dockerfile
Nov 14, 2022
3ccfd9a
解决user setting并发问题,fix #566
Nov 15, 2022
b4d163e
添加android客户端签名验证功能
Nov 18, 2022
ab8ae9d
mqtt proto version error
Nov 18, 2022
95b08ff
Revert "mqtt proto version error"
Nov 18, 2022
b5d8fea
客户端连接时检查是否跟获取token的平台一致
Nov 18, 2022
17039bd
http请求错误时不打印数据内容,防止内容泄露
Nov 19, 2022
3e1095f
移动release note文件的位置
Nov 19, 2022
1486b19
更新版本和release note
Nov 19, 2022
ad5f6cb
添加注释
Nov 21, 2022
7443db3
检查工具添加help命令
Nov 22, 2022
f7853ae
解决短连接端口被扫描时打印出异常日志的问题
Nov 24, 2022
6127472
创建群组时,支持组织群
imndx Nov 25, 2022
996e06c
添加禁止客户端群操作配置
Nov 26, 2022
b0ddca9
route时可能不能携带正确的推送类型
Dec 6, 2022
1c18d86
会议离开加上原因
Dec 7, 2022
9047020
添加停止命令
Dec 12, 2022
9c69fbc
sdk add conference rtp forward api
Dec 13, 2022
4628b3b
sdk add conference rtp forward api
Dec 22, 2022
cc561b8
更新版本号和release note
Dec 28, 2022
6e83ec8
server sdk http request add log
Jan 4, 2023
2f7f4e6
update readme
Jan 10, 2023
1c9d238
update readme
Jan 19, 2023
fa8a2be
channel api添加检查是否是订阅者的接口
Feb 8, 2023
e28a4c6
server api发送消息检查对象是否存在
Feb 11, 2023
f11da62
添加修改频道菜单接口
Feb 12, 2023
93be667
日志文件精确到分钟,避免出现问题时被复写
Feb 14, 2023
6746a54
优化内置存储功能
Feb 14, 2023
c284272
文件存储路径中加上分钟和秒
Feb 15, 2023
6e1ba94
更新版本号和release note
Feb 15, 2023
2387148
当用户获取群组信息时,如果不在群中返回-1,如果已经离开群了返回离开时间的负数
Feb 20, 2023
704e6e0
搜索用户时,过滤掉被删除的用户
Feb 20, 2023
ca3bbb6
添加日志
imndx Feb 23, 2023
290a3ce
支持单聊会话的定向消息
Feb 28, 2023
ad33abc
用户消息表中的target优化
Feb 28, 2023
43892db
解决关闭roaming,且message.compensate_time_limit配置为-1时,首次消息无法同步的问题
Mar 2, 2023
a038bed
version and release note
Mar 6, 2023
4d45aed
禁止客户端群操作flag 解析错误
imndx Mar 6, 2023
5f95b18
release note
Mar 6, 2023
8b64920
添加检查会议是否存在的接口
Mar 6, 2023
c3bc62f
单聊会话发送定向消息时,分发目标需要包括自己。
Mar 10, 2023
6542b8b
version and release note
Mar 10, 2023
6a806aa
fix build error
Mar 10, 2023
b7b262b
服务检查时间是否一致
Mar 12, 2023
329791e
解决用户被block后,session失效问题
Mar 14, 2023
11b7851
启动脚本里面,打印 JAVA 版本信息
imndx Mar 20, 2023
68abeed
添加一些异常数据的处理
Mar 20, 2023
c29370a
添加撤回消息回调
Mar 24, 2023
b93c76c
优化群组撤回逻辑。
Apr 3, 2023
d40835a
解决grouptype为0时被删除用户还能修改群名称的问题
Apr 3, 2023
c89259e
修改群昵称时检查是否在群中
Apr 4, 2023
75cb7f8
修正当server api设置好友关系时,回调状态错误问题 #604
Apr 7, 2023
99c5210
同步专业版IM服务超级群组的数据库和SDK
Apr 13, 2023
62b36cd
超级群组协议
Apr 13, 2023
afee046
用户状态和频道订阅状态修改改成同步模式,防止高并发时出现问题
Apr 13, 2023
c6a8462
修改启动注释
Apr 13, 2023
083b07f
修改版本号和release note
Apr 13, 2023
c159ff9
去掉windows脚本中的中文,解决windows平台下启动失败的问题
Apr 19, 2023
758c5de
解决pc多端登录互踢时pc在线状态没有更新的问题
Apr 24, 2023
145709f
支持AES256配置
Apr 24, 2023
3c11c36
update readme
Apr 28, 2023
ca50872
server api添加获取单个群成员信息的接口
May 4, 2023
6245fe3
添加配置,请求机器人好友时,是否自动接受
May 4, 2023
4ad0437
更新版本号和release note
May 10, 2023
81585ec
docker file 为启动脚本添加执行属性
May 17, 2023
26fbde6
stop脚本等待时间延长到30秒
May 17, 2023
252204a
添加好友时,只检查对方的黑名单状态
May 27, 2023
c8ff39c
添加获取所有用户的Server API
Jun 20, 2023
0a7b8f9
version and release note
Jun 20, 2023
57314e6
用户设置查找自己的方法
Jun 28, 2023
45b1b9c
解决搜索用户时返回用户类型问题
Jul 8, 2023
15f7777
添加获取订阅频道的功能
Jul 20, 2023
509048d
1.1.6 version and release node
Jul 20, 2023
5c7b320
同步专业版IM服务代码
Aug 1, 2023
7d10251
优化用户搜索
Aug 4, 2023
f3a2603
推送信息中,目标名称考虑到群备注,另外添加发送者和目标的头像
Aug 4, 2023
2bec610
优化撤回消息
Aug 5, 2023
082f42a
1.1.7 version and release note
Aug 7, 2023
30e01a7
修改docker说明
Aug 26, 2023
a2ee6c8
不能把群主设置为管理员
Sep 6, 2023
ad5d499
发送好友请求之后5分钟之内可以再次发送
Sep 6, 2023
1e5ac9b
修改配置文件注释
Sep 7, 2023
932ee92
解决撤回消息中原消息中二进制消息数据格式错误问题
Sep 7, 2023
3f4c2b0
version 1.1.8 & release note
Sep 7, 2023
a183d30
解决服务器时间过大的问题 https://github.com/wildfirechat/android-chat/issues/795
Sep 11, 2023
4e6188e
添加推送过期配置
Sep 13, 2023
d13ed6f
sdk打印出请求的完整路径,方便问题排查
Sep 26, 2023
92c3c98
解决重复发送好友请求时,请求时间没有更新的问题
Sep 29, 2023
dd5b9b1
解决好友请求被拒绝后可能还能再次请求的问题
Sep 29, 2023
7727fad
避免无限制重复好友请求,好友请求在5分钟之内只允许重复请求一次
Sep 29, 2023
c17a5be
支持获取用户群组指定群成员类型
Oct 10, 2023
8e3100e
添加配置,是否允许群主和群管理员不受限制撤回自己的发言
Oct 10, 2023
6a10412
version 1.1.9 and release note
Oct 12, 2023
a1188f5
添加配置开关,可以关掉api/version检查接口
Oct 12, 2023
aa11611
更新readme
Oct 14, 2023
c43dfe2
更新SDK的依赖说明
Oct 21, 2023
b4fcef1
会议事件添加时间戳
Nov 5, 2023
df67b8e
禁止私聊时,只要发送者或接受者一方在允许私聊的列表里面,就允许私聊 fix #663
imndx Nov 10, 2023
327b8d4
解决某些特殊情况下获取网卡信息失败导致启动失败的问题
Nov 15, 2023
63f0fc6
支持按照用户ID来搜索用户
Nov 15, 2023
724be0b
添加获取用户聊天室状态的API
Nov 17, 2023
24c6538
添加配置,处理多端同时加入聊天室的问题
Nov 17, 2023
08b813c
version 1.2.0 and release note
Nov 18, 2023
b774e0d
添加获取在线用户信息和获取用户session信息的接口
Nov 28, 2023
93b6e70
优化用户id搜索逻辑
Nov 30, 2023
90e8997
消息表的消息id索引改成唯一索引,只对新库有效,已有数据库不影响。
Dec 2, 2023
594103e
解决广播没有发送消息给未登录用户的问题
Dec 2, 2023
54286b4
release note and version
Dec 3, 2023
8c93e2e
update readme
Dec 11, 2023
49ad4f5
机器人sdk添加撤回和更新接口
Dec 26, 2023
bc40904
解决搜索时特殊字符的转义问题
Dec 27, 2023
8a13a32
sdk支持流式文本
Dec 30, 2023
c014b78
1,添加配置,可以禁止拉陌生人进群
Jan 14, 2024
cb5754f
群组信息变更回调中加上群组信息
Jan 14, 2024
c805bdd
version and release note
Jan 14, 2024
7094114
同步专业版IM服务SDK
Jan 27, 2024
1e17fa1
同步专业版IM SDK
Feb 2, 2024
f1e46fc
同步专业版IM服务
Feb 2, 2024
58ade23
添加鸿蒙平台的支持
Feb 4, 2024
fe4612c
解决server端音视频SDK信令透传问题
Feb 22, 2024
a4bcd5e
同步专业版IM服务
Feb 22, 2024
d91a2d9
升级部分依赖版本
Feb 27, 2024
2ef0059
remove useless test code
Feb 27, 2024
ae3c8e0
升级部分依赖版本
Feb 27, 2024
6c2848c
升级依赖
Feb 27, 2024
c01e5b6
version and release note
Mar 7, 2024
a702602
去掉用户信息中的密码处理
Mar 23, 2024
0a05503
创建频道和机器人时,不再设置默认头像
Mar 23, 2024
37f1772
在线状态回调添加其他端的状态
Mar 23, 2024
a906bf3
version and release note
Mar 25, 2024
c4421fc
server api添加通过邮箱获取用户列表的接口
Mar 25, 2024
ebb0535
群组标记删除
Mar 30, 2024
394b911
添加配置,可以在会话静音/全局静音/PC在线时静音时强制推送。
Apr 3, 2024
73e3447
强制推送配置默认为关闭
Apr 3, 2024
135a9ed
添加用户设置添加好友验证功能
Apr 19, 2024
0a3516c
version and release note
Apr 19, 2024
ce21441
群主强制被退群时(销毁账号/server api强制退群),调整新群主选择,群管理优先,先加入群组优先。
Apr 23, 2024
9aac87b
拉取消息时,处理重复消息
Apr 23, 2024
85a4c80
退群时添加是否保留消息的参加
Apr 25, 2024
3ab1c75
如果用户不在群中,不再进行群组信息更新
Apr 25, 2024
386d0b9
删除无用代码
Apr 27, 2024
1d234a3
获取被删除群组时总是同步
Apr 28, 2024
4895f03
version and release note
May 5, 2024
f2601fc
针对非x86_64平台关于epoll的说明
May 7, 2024
1aed4b1
搜索频道时,解决某些频道不能搜索出来的问题
May 29, 2024
c69906e
添加频道新的回调特性
May 29, 2024
10fce4b
解决机器人API修改机器人用户信息客户端没有更新的问题
Jun 11, 2024
68ae7db
SDK中关于频道的api放到ChannelAdmin方法中
Jun 11, 2024
d751a70
添加Mesh相关SDK
Jun 21, 2024
5a52a7d
同步专业版IM服务
Jun 30, 2024
5a21370
version and release note
Jun 30, 2024
100a1bd
update readme
Jul 7, 2024
6ef8b78
server api获取被封禁用户时,过滤掉正常用户
Jul 9, 2024
4005a4b
配置文件注释说明
Jul 10, 2024
f5af956
更新readme
Jul 19, 2024
a11cf3c
解决群组标记删除错误
Jul 19, 2024
ea00ef6
添加发送消息的示例
Jul 19, 2024
d0fdf55
群组解散后撤回失败的错误码应该是不存在
Jul 29, 2024
9483378
update readme
Aug 12, 2024
9d83f8e
解决某些时候http请求返回信息无法读取问题
Aug 14, 2024
c1d353b
version & release note
Aug 19, 2024
52de13e
sdk中针对密钥错误给出提醒
Aug 22, 2024
291fdfb
解决server api获取群组信息不全的问题
Sep 3, 2024
04f5471
用户id默认使用uuid
Sep 10, 2024
b1f5949
version and release note
Sep 10, 2024
fc35865
push message 添加 republish 属性
Sep 12, 2024
a45de0e
添加好友请求限频功能
Sep 12, 2024
41f62c6
添加配置,是否允许发送消息给黑名单用户
Sep 14, 2024
f1298a5
添加鸿蒙推送回调地址
Sep 18, 2024
bf22b36
如果没有配置鸿蒙推送地址,不应该回落到Android,避免对android造成影响
Sep 18, 2024
d100bd5
update readme
Sep 18, 2024
6d91f38
创建群组或者添加群组成员时,群组成员的Extra会放到通知消息的extra中,这样便于业务处理通知消息
Sep 25, 2024
845e6ff
version and release note
Sep 29, 2024
dd1783d
透传消息去掉消息id和时间戳,减少消息体大小
Oct 2, 2024
fbc2351
用户可以设置禁止添加好友
Oct 2, 2024
1ff3b59
创建群组时检查操作者参数是不是存在
Oct 25, 2024
4ed21ec
添加生成测试工具的工具
Oct 25, 2024
55190a4
优化生成测试数据工具
Oct 26, 2024
462423a
SDK添加删除广播和组播接口
Oct 28, 2024
78e6efc
透传消息需要带上时间戳
Oct 30, 2024
f3f08b3
version & release note
Oct 30, 2024
1b8cf3e
添加机器人的朋友圈接口
Nov 3, 2024
0549bc5
添加批量获取用户信息的接口
Nov 14, 2024
3d98d17
机器人接口添加更新朋友圈接口
Nov 14, 2024
8635153
解决聊天室定向消息问题
Nov 20, 2024
03894ae
修改启动成功的提示语
Dec 6, 2024
f603a67
当禁止私聊时可以配置例外的线路
Dec 6, 2024
d45da96
默认开启支持支持踢出事件的开关
Dec 11, 2024
ade58ef
更新版本号和release note内容
Dec 11, 2024
cbcc831
敏感词过滤类型默认改成2
Dec 15, 2024
dafb0cd
修改nginx配置示例中上传文件的大小为200MB
Dec 26, 2024
83e9679
SDK的地址和密钥添加trim,避免空格换行等问题
Jan 2, 2025
86c1a2e
转移群主时检查目标用户是否在群组中
Jan 3, 2025
6587a88
修改注释
Jan 14, 2025
9191204
nginx配置注释
Jan 15, 2025
cb3a825
机器人API添加定向消息参数
Jan 17, 2025
ae08406
serveri api获取用户信息时返回deleted字段
Jan 23, 2025
5acb304
Revert "serveri api获取用户信息时返回deleted字段"
Jan 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 17 additions & 7 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
### Expected behavior
## 提issue小提示
为了尽快定位问题,需要提供足够的信息,请按照我们的要求格式来提问。***如果您不按照格式提问,我们将无法回复您的问题***

### Actual behavior
#### 操作说明
详细说明操作那个界面,每一步骤都要说得详细,如果是SDK或者api使用问题,需要详细说明调用的那个函数,参数都是什么。

### Steps to reproduce
#### 表现现象
描述一下什么现象,比如说函数返回error,errorcode是多少,或者界面上是什么状态,比如发送消息显示发送失败的红点。不要笼统的说功能有问题,不起作用。

### Minimal yet complete reproducer code (or URL to code) or complete log file
#### 预期结果
你认为正确的表现应该是什么样的。

### Moquette MQTT version
#### 补充条件
是否是必现的,还是偶现的?是否只有在特殊的网络/设备/平台上出现,还是所有的都出现。还有您用的版本是什么时候的,是不是最新版

### JVM version (e.g. `java -version`)
#### demo对比结果
请用demo对比测试,demo上是什么状态。

### OS version (e.g. `uname -a`)
#### 检索已有问题
除了可以检索已有issue外,还可以去野火论坛查找已有问题,论坛地址为 https://bbs.wildfirechat.cn

#### star 我们
给我们点个star,可以及时接收到我们回复信息,另外也是对我们支持人员辛苦工作的认可,激励我们更好更快地为大家服务。
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,9 @@ broker/media
common/target
server/target
sdk/target
moments/target
monitor
wildfire_jmeter
git.properties
wildfirechat.license
broker/logs
281 changes: 231 additions & 50 deletions README.md

Large diffs are not rendered by default.

38 changes: 35 additions & 3 deletions broker/config/hazelcast.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

<!-- # 本配置文件为debug使用,修改这里不会在Release包中生效。Release中包含的配置文件在 ${Porject_Path}/distribution/src/main/resources目录下-->


<hazelcast
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.hazelcast.com/schema/config
Expand All @@ -9,6 +13,10 @@
</join>
</network>

<properties>
<property name="hazelcast.logging.type">slf4j</property>
</properties>

<!-- map eviction -->
<!-- http://docs.hazelcast.org/docs/latest-development/manual/html/Distributed_Data_Structures/Map/Map_Eviction.html -->
<map name="messages_map">
Expand Down Expand Up @@ -57,6 +65,15 @@
</map-store>
</map>

<map name="user_friends_empty">
<time-to-live-seconds>86400</time-to-live-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="PER_NODE">1000000</max-size>
<eviction-percentage>10</eviction-percentage>
</map>



<set name="node_ids"/>

<multimap name="user_setting">
Expand All @@ -77,6 +94,12 @@
<map name="user_chatroom">
</map>

<multimap name="chatroom_black">
</multimap>

<multimap name="chatroom_manager">
</multimap>

<map name="robots">
<!-- 7 days -->
<time-to-live-seconds>604800</time-to-live-seconds>
Expand All @@ -88,14 +111,23 @@
<write-delay-seconds>0</write-delay-seconds>
</map-store>
</map>

<map name="things">

<map name="devices">
<!-- 7 days -->
<time-to-live-seconds>604800</time-to-live-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="PER_NODE">1000000</max-size>
<eviction-percentage>10</eviction-percentage>
<map-store enabled="true">
<class-name>io.moquette.persistence.DeviceLoader</class-name>
<write-delay-seconds>0</write-delay-seconds>
</map-store>
</map>

<multimap name="user_robots">
</multimap>

<multimap name="user_things">
<multimap name="user_devices">
</multimap>

<multimap name="chatroom_members">
Expand Down
396 changes: 355 additions & 41 deletions broker/config/wildfirechat.conf

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions broker/migrate/h2/V15__alter_voip_token_length.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
alter table `t_user_session` modify column `_voip_token` varchar(240) DEFAULT '';


2 changes: 2 additions & 0 deletions broker/migrate/h2/V16__add_friend_blocked.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter table t_friend add column `_blacked` tinyint DEFAULT 0;
update t_friend set `_blacked` = 1 where `_state` = 2;
1 change: 1 addition & 0 deletions broker/migrate/h2/V17__add_user_session_token_index.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table `t_user_session` ADD INDEX `session_token_index` ( `_token` );
1 change: 1 addition & 0 deletions broker/migrate/h2/V18__add_friend_request_index.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table t_friend_request add index `friend_request_uid_index` (`_friend_uid`);
1 change: 1 addition & 0 deletions broker/migrate/h2/V19__add_user_session_uid_index.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table `t_user_session` ADD INDEX `session_uid_index` ( `_uid` );
1 change: 1 addition & 0 deletions broker/migrate/h2/V20__user_session_add_deleted.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table `t_user_session` add column `_deleted` tinyint DEFAULT 0;
1 change: 1 addition & 0 deletions broker/migrate/h2/V21__user_add_deleted.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table `t_user` add column `_deleted` tinyint DEFAULT 0;
1 change: 1 addition & 0 deletions broker/migrate/h2/V22__refactor_channel_status.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
update t_channel set `_status` = 64 where `_status` = 3;
2 changes: 2 additions & 0 deletions broker/migrate/h2/V23__alter_message_add_to_column.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter table t_messages add column `_to` varchar(64) DEFAULT NULL;

1 change: 1 addition & 0 deletions broker/migrate/h2/V24__add_friend_extra.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table t_friend add column `_extra` TEXT DEFAULT NULL;
22 changes: 22 additions & 0 deletions broker/migrate/h2/V25__create_chatroom_blacklist_manager.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

DROP TABLE IF EXISTS `t_chatroom_blacklist`;
CREATE TABLE `t_chatroom_blacklist` (
`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`_cid` varchar(64) NOT NULL,
`_uid` varchar(64) NOT NULL,
`_state` tinyint NOT NULL DEFAULT 0,
`_expired_time` bigint(20) NOT NULL,
`_dt` bigint(20) NOT NULL,
UNIQUE INDEX `cr_bl_uid_index` (`_cid`,_uid)
);

DROP TABLE IF EXISTS `t_chatroom_manager`;
CREATE TABLE `t_chatroom_manager` (
`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`_cid` varchar(64) NOT NULL,
`_uid` varchar(64) NOT NULL,
`_state` tinyint NOT NULL DEFAULT 0,
`_dt` bigint(20) NOT NULL,
UNIQUE INDEX `cr_man_uid_index` (`_cid`,_uid)
);

2 changes: 2 additions & 0 deletions broker/migrate/h2/V26__add_user_messages_line.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter table `t_user_messages` add column `_line` int(11) NOT NULL DEFAULT 0;
alter table `t_user_messages` ADD INDEX `message_mid_line_uid_index` ( `_uid` DESC, `_line` DESC, `_mid` DESC );
22 changes: 22 additions & 0 deletions broker/migrate/h2/V27__create_device_table.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

DROP TABLE IF EXISTS `t_thing`;

DROP TABLE IF EXISTS `t_device`;
CREATE TABLE `t_device` (
`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`_uid` varchar(64) NOT NULL,
`_token` varchar(64) DEFAULT '',
`_state` tinyint DEFAULT 0,
`_extra` TEXT DEFAULT NULL,
`_dt` bigint(20) NOT NULL,
UNIQUE INDEX `device_uid_index` (`_uid` ASC)
);

DROP TABLE IF EXISTS `t_user_device`;
CREATE TABLE `t_user_device` (
`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`_uid` varchar(64) NOT NULL,
`_did` varchar(64) DEFAULT '',
INDEX `user_device_uid_index` (`_uid` ASC),
INDEX `user_device_did_index` (`_did` ASC)
);
1 change: 1 addition & 0 deletions broker/migrate/h2/V28__add_session_user_type.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table t_user_session add column `_user_type` tinyint DEFAULT 0;
42 changes: 42 additions & 0 deletions broker/migrate/h2/V29__create_receipt_table.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

DROP TABLE IF EXISTS `t_read_report`;
CREATE TABLE `t_read_report` (
`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`_uid` varchar(64) NULL,
`_type` tinyint NULL,
`_line` int(11) NULL,
`_target` varchar(64) NULL,
`_dt` bigint(20) NOT NULL DEFAULT 0,
INDEX `read_report_index` (`_uid`, `_type`, `_line`, `_target`)
);

DROP TABLE IF EXISTS `t_user_read_report`;
CREATE TABLE `t_user_read_report` (
`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`_rid` int(11) NOT NULL,
`_uid` varchar(64) NOT NULL,
`_seq` bigint(20) NOT NULL,
`_dt` DATETIME NOT NULL DEFAULT NOW(),
INDEX `user_read_report_index` (`_uid` DESC, `_seq` DESC),
UNIQUE INDEX `user_read_report_index2` (`_uid` DESC, `_rid` DESC)
);

DROP TABLE IF EXISTS `t_delivery_report`;
CREATE TABLE `t_delivery_report` (
`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`_uid` varchar(64) NOT NULL,
`_dt` bigint(20) NOT NULL,
UNIQUE INDEX `delivery_index` (`_uid`)
);


DROP TABLE IF EXISTS `t_user_delivery_report`;
CREATE TABLE `t_user_delivery_report` (
`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`_rid` varchar(64) NOT NULL,
`_uid` varchar(64) NOT NULL,
`_seq` bigint(20) NOT NULL,
`_dt` DATETIME NOT NULL DEFAULT NOW(),
INDEX `user_delivery_index` (`_uid` DESC, `_seq` DESC),
UNIQUE INDEX `user_delivery_index2` (`_uid` DESC, `_rid` DESC)
);
1 change: 1 addition & 0 deletions broker/migrate/h2/V30__add_group_member_create_dt.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table t_group_member add column `_create_dt` bigint(20) DEFAULT 0;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter table `t_group` add column `_history_message` tinyint NOT NULL DEFAULT 0;
alter table `t_group` add column `_max_member_count` int(11) NOT NULL DEFAULT 2000;
2 changes: 2 additions & 0 deletions broker/migrate/h2/V32__alter_setting_column_name.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter table `t_settings` change column `value` `_value` varchar(64) NOT NULL;
alter table `t_settings` change column `desc` `_desc` varchar(64) NOT NULL;
1 change: 1 addition & 0 deletions broker/migrate/h2/V33__alter_group_searchable_column.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table `t_group` modify column `_searchable` int(11) NOT NULL DEFAULT 0;
15 changes: 15 additions & 0 deletions broker/migrate/h2/V34__create_files_table.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
DROP TABLE IF EXISTS `t_file`;
CREATE TABLE `t_file` (
`_mid` bigint(20) NOT NULL PRIMARY KEY,
`_from` varchar(64) NOT NULL,
`_type` tinyint NOT NULL DEFAULT 0,
`_target` varchar(64) NOT NULL,
`_line` int(11) NOT NULL DEFAULT 0,
`_name` varchar(128) DEFAULT '',
`_url` varchar(1024) NOT NULL DEFAULT '',
`_size` int(11) NOT NULL DEFAULT 0,
`_download_count` int(11) DEFAULT 0,
`_dt` bigint(20) NOT NULL,
INDEX `file_conv_index` (`_type`, `_line`, `_target`, `_mid`),
INDEX `file_user_index` (`_from`, `_mid`)
);
3 changes: 3 additions & 0 deletions broker/migrate/h2/V35__create_file_transfer_user.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

insert into t_user (`_uid`,`_name`,`_display_name`,`_portrait`,`_type`,`_dt`) values ('wfc_file_transfer','wfc_file_transfer','文件传输助手','https://static.wildfirechat.cn/wfc_file_transfer.png',1,1);
insert into t_robot (`_uid`,`_owner`,`_secret`,`_callback`,`_state`,`_dt`) values ('wfc_file_transfer', 'wfc_file_transfer', '', '', 0, 1);
1 change: 1 addition & 0 deletions broker/migrate/h2/V36__alter_channel_status_column.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table `t_channel` modify column `_status` int(11) NOT NULL DEFAULT 0;
1 change: 1 addition & 0 deletions broker/migrate/h2/V37__add_user_messages_mid_index.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table `t_user_messages` ADD INDEX `user_messages_mid_index` ( `_mid`);
4 changes: 4 additions & 0 deletions broker/migrate/h2/V38__add_user_messages_conv_info.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
alter table `t_user_messages` add column `_type` tinyint(4) NOT NULL DEFAULT '0';
alter table `t_user_messages` add column `_target` varchar(129) NOT NULL DEFAULT '';
alter table `t_user_messages` add column `_directing` tinyint(1) NOT NULL DEFAULT '0';
alter table `t_user_messages` add INDEX `user_messages_conv_index` ( `_uid`, `_type`, `_target`, `_line`, `_mid` desc);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter table `t_group_member` add column `_extra` TEXT DEFAULT NULL;
alter table `t_friend_request` add column `_extra` TEXT DEFAULT NULL;
1 change: 1 addition & 0 deletions broker/migrate/h2/V40__add_user_messages_cont_type.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table `t_user_messages` add column `_cont_type` int(11) NOT NULL DEFAULT '0';
1 change: 1 addition & 0 deletions broker/migrate/h2/V41__alter_user_setting_key_column.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table `t_user_setting` modify column `_key` varchar(128) NOT NULL;
13 changes: 13 additions & 0 deletions broker/migrate/h2/V42__create_secret_chat_table.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

DROP TABLE IF EXISTS `t_secret_chat`;
CREATE TABLE `t_secret_chat` (
`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`_uid` varchar(64) NOT NULL,
`_from` varchar(64) DEFAULT '',
`_from_cid` varchar(64) DEFAULT '',
`_to` varchar(64) DEFAULT '',
`_to_cid` varchar(64) DEFAULT '',
`_state` tinyint NOT NULL DEFAULT 0,
`_dt` bigint(20) NOT NULL,
UNIQUE INDEX `secret_chat_uid_index` (`_uid` DESC)
);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table `t_messages` add INDEX `messages_conv_index` ( `_type`, `_target`, `_line`);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table `t_channel_listener` add INDEX `channel_mid_index` ( `_mid`);
1 change: 1 addition & 0 deletions broker/migrate/h2/V45__add_channel_menu_column.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table `t_channel` add column `_menu` BLOB DEFAULT NULL;
1 change: 1 addition & 0 deletions broker/migrate/h2/V46__add_group_member_mid_index.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table `t_group_member` add INDEX `group_member_mid_index` (`_mid`);
19 changes: 19 additions & 0 deletions broker/migrate/h2/V47__create_super_group.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
alter table `t_group` add column `_super_group` tinyint NOT NULL DEFAULT 0;

DROP TABLE IF EXISTS `t_group_messages`;
CREATE TABLE `t_group_messages` (
`_mid` bigint(20) NOT NULL PRIMARY KEY,
`_sender` varchar(64) NOT NULL,
`_gid` varchar(64) NOT NULL,
`_line` int(11) NOT NULL,
`_client_id` varchar(64) NULL,
`_seq` bigint(20) NOT NULL,
`_persist_flag` int(11) NOT NULL,
`_mentioned_type` int(11) NOT NULL,
`_mentioned_targets` BLOB NULL,
`_to` BLOB NULL,
`_cont_type` int(11) NOT NULL DEFAULT 0,
`_duration` int(11) NOT NULL DEFAULT 0,
`_dt` bigint(20) NOT NULL DEFAULT 0,
INDEX `group_message_seq_uid_index` (`_gid` DESC, `_line`, `_seq` DESC)
);
2 changes: 2 additions & 0 deletions broker/migrate/h2/V48__group_add_deleted_column.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter table `t_group` add column `_deleted` tinyint NOT NULL DEFAULT 0;

13 changes: 13 additions & 0 deletions broker/migrate/h2/V49__add_domain_table.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
DROP TABLE IF EXISTS `t_domain`;
CREATE TABLE `t_domain` (
`_domain_id` varchar(64) NOT NULL PRIMARY KEY,
`_name` varchar(64) NOT NULL,
`_desc` varchar(256) DEFAULT '',
`_email` varchar(64) DEFAULT '',
`_tel` varchar(64) DEFAULT '',
`_address` varchar(64) DEFAULT '',
`_extra` varchar(1024) DEFAULT '',
`_dt` bigint(20) NOT NULL
);

alter table `t_user` add column `_external` tinyint DEFAULT 0;
Loading