You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -103,30 +103,30 @@ The demo data initialization is handled in multiple steps:
103
103
104
104
#### Creating of demo users
105
105
106
-
We create a new user id: INCR total_users. Then we set a user ID lookup key by user name: e.g.
106
+
We create a new user id: INCR total_users. Then we set a user ID lookup key by user name: e.g.
107
107
108
108
```
109
109
SET username:nick user:1
110
110
```
111
111
112
112
And finally, the rest of the data is written to the hash set: e.g. HSET user:1 username "nick" password "bcrypt_hashed_password".
113
113
114
-
Additionally, each user is added to the default "General" room.
115
-
For handling rooms for each user, we have a set that holds the room ids. Here's an example command of how to add the room:
114
+
Additionally, each user is added to the default "General" room.
115
+
For handling rooms for each user, we have a set that holds the room ids. Here's an example command of how to add the room:
116
116
117
117
```
118
118
SADD user:1:rooms "0"
119
119
```
120
120
121
121
Populate private messages between users. At first, private rooms are created: if a private room needs to be established, for each user a room id: room:1:2 is generated, where numbers correspond to the user ids in ascending order.
122
122
123
-
E.g. Create a private room between 2 users:
123
+
E.g. Create a private room between 2 users:
124
124
125
125
```
126
126
SADD user:1:rooms 1:2 and SADD user:2:rooms 1:2
127
127
```
128
128
129
-
Then we add messages to this room by writing to a sorted set:
129
+
Then we add messages to this room by writing to a sorted set:
0 commit comments