euphoria-io / heim

A real-time community platform.
https://euphoria.io
Other
874 stars 47 forks source link

Only person in room not acknowledged in development mode #75

Closed CylonicRaider closed 7 years ago

CylonicRaider commented 8 years ago

When running the development server and being the only person in a room (bots don't count), the nick-name will not appear in the user list (however, the counter will correctly display "1", the nick can be changed, messages can be sent, etc.). Issue disappears seemingly when a second person joins the room, and re-appears when only one is left. The psql container produces error messages every time a nick is set or changed (when any amount of persons is in the room), along the lines of

psql_1 | ERROR:  duplicate key value violates unique constraint "nick_pkey"
psql_1 | DETAIL:  Key (user_id, room)=(<...>, <...>) already exists.
psql_1 | STATEMENT:  insert into "nick" ("room","user_id","nick") values ($1,$2,$3);

(insert appropriate values for <...>)

Reported for commit a7d537a405fae144983cbba6b6af20ad174debab.

CylonicRaider commented 7 years ago

The user list issue was subsequently fixed in #93; the database errors are not related to that.