gpg: Signature made Fri 04 Sep 2026 00:58:11 IST
gpg: using EDDSA key 25BB975698147F3F76719E0C60B5F0386E3DDB7Egpg: using EDDSA key 25BB975698147F3F76719E0C60B5F0386E3DDB7E gpg: Good signature from "ari melody <ari@arimelody.space>" [ultimate] gpg: aka "ari melody <ari@arimelody.me>" [ultimate] initial design for new chat widget
This commit is contained in:
parent
4d0efce2e0
commit
eab3c09b8b
8 changed files with 359 additions and 17 deletions
|
|
@ -42,21 +42,22 @@ type (
|
|||
ChatMessageModifier string
|
||||
chatMessage struct {
|
||||
ID string `json:"id"`
|
||||
Username string `json:"username,omitempty"`
|
||||
Username string `json:"username"`
|
||||
Colour string `json:"colour,omitempty"`
|
||||
Text string `json:"text,omitempty"`
|
||||
Fragments []api.ChatMessageFragment `json:"fragments,omitempty"`
|
||||
Text string `json:"text"`
|
||||
Badges []api.ChatBadge `json:"badges"`
|
||||
Fragments []api.ChatMessageFragment `json:"fragments"`
|
||||
Modifier ChatMessageModifier `json:"modifier,omitempty"`
|
||||
AnnouncementColour string `json:"announcement_colour,omitempty"`
|
||||
}
|
||||
SystemChatMessageType string
|
||||
systemChatMessage struct {
|
||||
Text string `json:"text,omitempty"`
|
||||
Text string `json:"text"`
|
||||
Type SystemChatMessageType `json:"type,omitempty"`
|
||||
}
|
||||
deleteChatMessage struct {
|
||||
Username string `json:"username,omitempty"`
|
||||
MessageID string `json:"message_id,omitempty"`
|
||||
Username string `json:"username"`
|
||||
MessageID string `json:"message_id"`
|
||||
}
|
||||
|
||||
ServiceOptions struct {
|
||||
|
|
@ -319,6 +320,8 @@ func (srv *Service) BindRoutes(group *gin.RouterGroup) {
|
|||
deleteChatUpdate := srv.DeleteChatBroadcast.Subscribe()
|
||||
defer srv.DeleteChatBroadcast.Cancel(deleteChatUpdate)
|
||||
|
||||
ctx.SSEvent("hello", "hello")
|
||||
|
||||
ticker := time.NewTicker(10 * time.Millisecond)
|
||||
ctx.Stream(func(w io.Writer) bool {
|
||||
select {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue