opentreehole / treehole_next Goto Github PK
View Code? Open in Web Editor NEWNext generation of Open Tree Hole written in go
License: Apache License 2.0
Next generation of Open Tree Hole written in go
License: Apache License 2.0
此Issue搬运自飞书原《功能需求和bug修复建议》文档
备注
来自 Eric 同学:目前滥用举报的主要表现有:1)错把举报当回复(少数)2)举报的理由根本就不出自于社区公约3)辱骂管理员4)泄愤式举报。我的一个想法是,请求后端的同学把举报栏改成单选题的模式,限制用户只能从公约的条款中选择,而不是打字。这样可以解决前三者,也能够引导用户注意社区公约。
Zhuo:个人认为社区公约条目太多,不可能一一列举,建议选取几个作为备选项,并且提供自定义选项)
提出部门
社区运营部
仍然遵循 restful api,部分 API 兼容 V1,V2 是为了 V3 过度
返回 hole 时去掉 floors 字段,仅添加 first floor, last floor, 可以添加 is_favorite, 这里 hole 数据库结构和 返回的 hole response 结构必须分离,具体设计可以参考 backend 仓库
其他接口只在注册时添加一个对称的 v2 即可
新功能
数据库优化
缓存优化
其他优化
后端性能优化(长期)
细节整理
更好的测试
日志
Bug修复
此Issue搬运自飞书原《功能需求和bug修复建议》文档
备注
略
提出部门
社区运营部
Describe the bug
POST /floors/{id}/like/{like} 返回的 floor 实例中始终带有空的 mention
数组。
Expected behavior (Optional)
应带有正确的 mention
数组。
[[Describe the feature]]
Describe the feature
锁定 hole,禁止非管理员发帖和修改 tag
Describe how to implement it
What does this feature intend to do
有的时候帖子讨论的内容偏离主题了,就不适宜在这个帖子下继续讨论下去了
Additional context
Describe the feature
查询一个用户自己发的所有内容
Describe how to implement it
根据 user_id 查询 floor,需要支持分页和缓存
What does this feature intend to do
用户历史记录
Additional context
无
希望实现一下需求:
以上需求均不急需。优先级递减。
Describe the feature
树洞内的禁言功能应在treehole微服务内实现,并提供查询禁言状态的接口。
Describe how to implement it
建立 ban
数据表,其中包含 user_id, expire_date, ban_division
三列。禁言时根据是否仍在禁言选择叠加或更新 expire_date
。用户发言时查询其 expire_date
是否已到期判断是否允许其发言。
提供接口供用户查询其在各板块中的禁言状态。
提供接口供管理员提前解除禁言。
What does this feature intend to do
降低treehole微服务与auth和网关的耦合。
Additional context
Describe the bug
To Reproduce
Expected behavior (Optional)
Screenshots (Optional)
Version
Additional context
需要给ListHolesByDivision添加按照时间排序的选项,包括按照发帖时间和回复时间两个选项。
目前客户端在用户自行删除帖子后不会立刻刷新(或者由于网络原因未能及时刷新),用户依然可以长按帖子选择编辑,修改删除后的默认文本(即「该内容被作者删除」)。
这可能会导致错误的行为,例如用户自行删除帖子后,将帖子内容修改为「该内容因 xxx(二级封禁)删除」,从而引发他人错误的认知。
应当在后端禁止对于已删除帖子的、非管理员来源的编辑。
Describe the feature
一个用户对一个帖子只能举报一次
Describe how to implement it
插入时检查举报列表中有没有对应的 floor_id, user_id 组,如果没有再插入。
What does this feature intend to do
防止举报刷屏
Describe the feature
Describe how to implement it
What does this feature intend to do
Additional context
Transfer from DanXi-Dev/DanXi#204 .
此Issue搬运自飞书原《功能需求和bug修复建议》文档
备注
因为有人在举报区人身攻击管理、滥用举报等,希望限制其使用举报功能、或者封禁
提出部门
社区运营部
增加 passkey 登录功能
Describe the question
待验证
此Issue搬运自飞书原《功能需求和bug修复建议》文档
备注
允许用户单洞屏蔽(但不能屏蔽某用户,因为可能会开盒)
提出部门
社区运营部
此Issue搬运自飞书原《功能需求和bug修复建议》文档
备注
如题,但不急。(不过最好能修一下)
提出部门
社区运营部
需求
见下游 issue DanXi-Dev/DanXi#239 简介及飞书文档。
Describe the bug
对同一层删除多次,查询违规历史时会得到多条重复的删除历史
To Reproduce
同一层多次删除后查询违规历史
Expected behavior (Optional)
对同一层多次删除后,只返回一条删除记录
Additional context
Describe the feature
前端如果需要跳转到任意楼层,需要加载整个洞,这对于高回复数的洞是不可取的。
Describe how to implement it
使用 floor.ranking 字段,加载对应楼的上下各 size 个楼,默认 size = 10;返回值中将包含最多 2 * size + 1 个楼。由于一个洞可能很小,一个楼的前后可能都不足 size 个楼,需要前端来判断加载位置。
select hole, ranking from floor where id = ?;
select * from floor where hold_id = ? and ranking between ? - size and ? + size;
What does this feature intend to do
对于高楼层的查询优化
Additional context
无
“批量删除”仍不可用。点击“批量删除”删除若干条信息后,信息没有被删除(刷新后同样如此)。
Describe the feature
[//]: # 账户注销后,将原有 user 表中的项标记为已删除,并将其 identifier 设为 null。新用户注册时,应当创建一个新的记录(即获得一个新的 user_id)
Additional context
[//]: # 账户注销时,应当检测是否还处于封禁期,以防通过注销重新注册的方式来解除禁言。
Describe the feature
将所有管理操作记录在数据库。管理操作包括:删帖、禁言、编辑他人帖子。
Describe how to implement it
建立一个单独的数据库,按管理操作分成若干个表,记录相关属性。
无需实现查询API,直接给管理团队提供读取数据库的权限。
实体类的初步设计:
// 删贴
type AdminDeleteAction struct {
FloorID int
Reason string
Content string
Operator int
}
// 禁言
type AdminBanAction struct {
FloorID int
Content int
Operator int
Duration int
}
// 编辑他人帖子
type AdminEditAction struct {
FloorID int
Content string
EditContent string
Operator int
}
What does this feature intend to do
供管理团队内部审计使用。
Additional context
For better performance, we decide to refactor OpenTreeHole in golang. This is a roadmap for the process.
Better use a microservice
此Issue搬运自飞书原《功能需求和bug修复建议》文档
备注
主要是用来发禁止回复的公告。如果要开发这个的话,需要在第三版公约中同步说明一下
提出部门
社区运营部
Describe the feature
树洞中加入投票功能,支持单选、多选、票数统计等
Describe how to implement it
建立 vote、vote_option 和 vote_option_user 表,vote 与 hole 一对一关联,在加载 hole 的时候把 vote 一并加载
What does this feature intend to do
实现投票功能
Additional context
APNS token length may be longer than 64 characters. The limit should be adjusted.
见下游 issue DanXi-Dev/DanXi#265 。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.