Enha: simplify sse (worsened event recieving)
This commit is contained in:
		| @@ -329,3 +329,19 @@ func HandleRemoveBot(w http.ResponseWriter, r *http.Request) { | ||||
| 	} | ||||
| 	notify(models.NotifyRoomUpdatePrefix+fi.Room.ID, "") | ||||
| } | ||||
|  | ||||
| func HandleGetRoom(w http.ResponseWriter, r *http.Request) { | ||||
| 	fi, err := getFullInfoByCtx(r.Context()) | ||||
| 	if err != nil { | ||||
| 		abortWithError(w, err.Error()) | ||||
| 		return | ||||
| 	} | ||||
| 	tmpl, err := template.ParseGlob("components/*.html") | ||||
| 	if err != nil { | ||||
| 		abortWithError(w, err.Error()) | ||||
| 		return | ||||
| 	} | ||||
| 	if err := tmpl.ExecuteTemplate(w, "room", fi); err != nil { | ||||
| 		log.Error("failed to execute template", "error", err) | ||||
| 	} | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder