File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,9 @@ func (h *Hub) Run() {
139
139
}
140
140
h .mutex .Unlock ()
141
141
}
142
+
143
+
144
+
142
145
}
143
146
}
144
147
@@ -161,6 +164,7 @@ func serveWs(
161
164
return
162
165
}
163
166
167
+
164
168
client := & Client {conn : conn , roomID : roomID }
165
169
hub .register <- client
166
170
@@ -214,6 +218,8 @@ func handleMessages(
214
218
log .Printf ("Failed to parse message: %v" , err )
215
219
continue
216
220
}
221
+
222
+
217
223
if msgData ["type" ] == "auth" {
218
224
token , tokenOk := msgData ["token" ].(string )
219
225
if ! tokenOk {
Original file line number Diff line number Diff line change @@ -43,6 +43,12 @@ func (db *ClientMappings) HandleRequest(request models.IncomingRequests) (*model
43
43
}
44
44
45
45
for _ , user1 := range currMappings {
46
+
47
+ if user1 == user2 {
48
+ //users cannot match with themselves
49
+ continue
50
+ }
51
+
46
52
result , err := db .Conn .HGetAll (ctx , user1 ).Result ()
47
53
48
54
if err == redis .Nil {
Original file line number Diff line number Diff line change 2
2
const nextConfig = { } ;
3
3
4
4
module . exports = {
5
+ eslint : {
6
+ ignoreDuringBuilds : true ,
7
+ } ,
5
8
reactStrictMode : false ,
6
9
async rewrites ( ) {
7
10
return [
You can’t perform that action at this time.
0 commit comments