Details
-
Bug
-
Resolution: Won't Fix
-
Low
-
None
-
None
-
None
-
Severity 2 - Major
Description
Summary
When a message is deleted from the chat history, the message is still visible even after a re-login
Environment
3.0.1
3.1.0
3.1.1
Steps to Reproduce
- add a random new message to a room (private or public)
- search for the message in the chat history
- delete the message from the chat history
- logout then login again
- join the room
Expected Results
The deleted message is not displayed in the chat screen
The message is removed from the HipChat database
The message is removed from Redis cache
Actual Results
The deleted message is still displayed in the chat screen
The message is removed from the HipChat database
The message is NOT removed from Redis cache
Notes
The problem only occurs with the last 75 messages of a room
(since HipChat only keeps the last 75 messages of a room in the Redis cache)
Workaround
Remove the room information from Redis cache with the command below
config=/hipchat/config/site.json && instance_host=$(jq .fqdn $config | sed 's/"//g') && export PGPASSWORD=$(jq -r ."databases"."hipchat_postgres"."pass" $config);export PGUSER=$(jq -r ."databases"."hipchat_postgres"."user" $config);export PGHOST=$(jq -r ."databases"."hipchat_postgres"."servers"[] $config| cut -d: -f1);export PGDATABASE=hipchat_postgres;redishost=$(psql -t -c "select value from configurations where key = 'redishostname'");redispass=$(psql -t -c "select value from configurations where key = 'redispass'"); redis-cli -h $redishost -a $redispass DEL history:room:1_<room name>
Replace <room name> with the database name of the room with the deleted message
To verify the database name of the room run the command below
config=/hipchat/config/site.json && instance_host=$(jq .fqdn $config | sed 's/"//g') && export PGPASSWORD=$(jq -r ."databases"."hipchat_postgres"."pass" $config);export PGUSER=$(jq -r ."databases"."hipchat_postgres"."user" $config);export PGHOST=$(jq -r ."databases"."hipchat_postgres"."servers"[] $config| cut -d: -f1);export PGDATABASE=hipchat_postgres; psql -c "select id,name,pretty_name from rooms"