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

评论通知机制 #84

Open
Enter-tainer opened this issue Sep 9, 2024 · 4 comments
Open

评论通知机制 #84

Enter-tainer opened this issue Sep 9, 2024 · 4 comments

Comments

@Enter-tainer
Copy link
Member

以邮件的形式通知评论 thread 里面的所有人

坑:

  1. github 用户可以选择不公开邮箱,可能要改github app的权限,来拿用户的私有邮箱?(还是默默地放弃给这样的用户发邮件)
  2. 邮件服务选什么好?还是自己手搓来发smtp https://developers.cloudflare.com/workers/runtime-apis/tcp-sockets/

希望邮件服务是可持续且低成本的。

除此之外好像也没有其他的通知的方案了?这个感觉可能是个大活了,maybe可以未来一段时间慢慢研究。

@Enter-tainer
Copy link
Member Author

ok, cf 似乎不让用 smtp 的端口?不知道是不是我理解的有问题 Your socket is connecting to an address on port 25. This is usually the port used for SMTP mail servers. Workers cannot create outbound connections on port 25

@shaokeyibb
Copy link
Member

ok, cf 似乎不让用 smtp 的端口?不知道是不是我理解的有问题 Your socket is connecting to an address on port 25. This is usually the port used for SMTP mail servers. Workers cannot create outbound connections on port 25

要不试试 SMTP OVER SSL/TLS?他们的端口好像是 587 或者 99x这种

@Enter-tainer
Copy link
Member Author

记录一下之前在群里的讨论的另外几种方案:

  1. 通过浏览器厂商的通知api来做,对db没有额外压力,会增加子请求数量。可能存在连接性问题,无法触达用户,可能有复杂的授权状态问题
  2. 通过自行维护每个用户的inbox来做,用户请求时将通知附加到response中。不会增加请求,会对db产生额外压力,通知无法被用户及时看到,只有在用户下次打开wiki的时候才能看到。可能存在交互逻辑的问题,比如要不要有前端inbox等等

@shaokeyibb
Copy link
Member

突然想到如果我们要做这个通知机制的话,恐怕我们得再搓一个 At 人的机制... 或者就是加一个回复的功能

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants