|
|
@ -258,11 +258,10 @@ func GetVisitorOnlines(c *gin.Context) {
|
|
|
|
// @Router /visitors_kefu_online [get]
|
|
|
|
// @Router /visitors_kefu_online [get]
|
|
|
|
func GetKefusVisitorOnlines(c *gin.Context) {
|
|
|
|
func GetKefusVisitorOnlines(c *gin.Context) {
|
|
|
|
kefuName, _ := c.Get("kefu_name")
|
|
|
|
kefuName, _ := c.Get("kefu_name")
|
|
|
|
roleId, _ := c.Get("kefu_id")
|
|
|
|
|
|
|
|
users := make([]*VisitorOnline, 0)
|
|
|
|
users := make([]*VisitorOnline, 0)
|
|
|
|
visitorIds := make([]string, 0)
|
|
|
|
visitorIds := make([]string, 0)
|
|
|
|
for uid, visitor := range ws.ClientList {
|
|
|
|
for uid, visitor := range ws.ClientList {
|
|
|
|
if visitor.To_id != kefuName && roleId.(float64) != 2 {
|
|
|
|
if visitor.To_id != kefuName {
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
}
|
|
|
|
userInfo := new(VisitorOnline)
|
|
|
|
userInfo := new(VisitorOnline)
|
|
|
|