chore: pick up the chat unread email notifications - #2
Merged
Merged
Conversation
CFEdgeChat emails a recipient whose UserHub holds no connection when a message arrives, once per conversation until they open it. UniBooks-BE gains the webhook event that composes and sends that mail, and points its email links at the region-prefixed frontend route. UniBooks-FE keeps the hub connection alive past the token's two-hour expiry — which is what "this user is away" is measured by — and stops the router throwing away the page from any link that arrives without a region prefix.
The previous commit pinned the feature-branch commits. The submodule PRs were rebase-merged, which gave each change a new SHA on main with an identical tree, so move the pointers there: the pinned commits are then reachable from main rather than only from a branch that can be deleted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
更新三個 submodule 的指標,帶進聊天未讀 email 通知。功能本身分散在三個 repo:
行為
有新訊息時,若收訊者完全沒有連線到 CFEdgeChat(不是「沒打開那個對話」,是「沒打開網頁」),就寄一封通知信給他;在他點開那個對話之前,同一個對話的後續訊息不會再寄。
合併順序
先合三個 submodule 的 PR,再更新這裡的指標。 目前這個 commit 指向的是各 submodule 分支上的 SHA;submodule 分支合併後若被刪除,這些 SHA 會變成孤兒 commit。建議三個合完之後,在這個分支上把 submodule 指到各自
main的新 commit 再合併。功能相依上,CFEdgeChat 與 UniBooks-BE 需要一起上線才會真的寄信;兩者單獨部署都不會出錯(Worker 送出 Django 尚未認識的 event 會走既有分支,Django 端的新 handler 沒有 Worker 呼叫就不會被觸發)。