OpenBazaar / OpenBazaar-Server

(Deprecated) OpenBazaar 1.0 Server daemon for communication with OpenBazaar-Client
MIT License
608 stars 173 forks source link

Inconsistent behavior on count of unread messages in Order's discussion #437

Open jjeffryes opened 8 years ago

jjeffryes commented 8 years ago

@rhcastilhos commented on Thu Jun 09 2016

Discussion button's count of unread messages is inconsistent. If you restart the software and go to Transactions page again, sometimes it adds the number of unread messages to the previous number of unread messages.

On example below I had 3 unread messages, it was showing 1, and after restarting software, it started showing 4 unread messages.

discussion count2

Other times I got the correct number (3). Other times you read the messages, close and open the software again, and the (3) unread messages sign is back again.

OB 1.1.6

jjeffryes commented 8 years ago

Additional information:

When get_purchases is called, the order unread value is 4, shown below:

{ "status": 0, "vendor": "153779d38194c8f539b26ee3e57be23140d6a79a", "description": "

Original\u00a0Phantom 3 Battery Charging Hub\u00a0

", "title": "DJI Phantom 3 Battery Charging Hub", "order_id": "846bc477015aa9737910870547a0cfec6e8a3704", "timestamp": 1461276354.98, "btc_total": 0.24845032, "contract_type": "physical good", "thumbnail_hash": "97b2a5941195e5aab49c1cf1880c108fea78c132", "unread": 4 }

When order_messages is called on that order, there are only 2 messages.

[ { "outgoing": true, "handle": "", "timestamp": 1465407547.097, "avatar_hash": "", "message": "test", "guid": "153779d38194c8f539b26ee3e57be23140d6a79a", "message_type": "ORDER" }, { "outgoing": false, "handle": "@dragonfly", "timestamp": 1465644522, "avatar_hash": "6664e1088c1b714551a32799b27eb3286a8d7b1d", "message": "Ok, You can also remove the transaction if you like.", "guid": "153779d38194c8f539b26ee3e57be23140d6a79a", "message_type": "ORDER" } ]