Skip to content

Commit cee925e

Browse files
committed
fix bug find my msg always 1
1 parent 986efb4 commit cee925e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mysql.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,8 @@ Json::Value sql_find_my_msg(std::string me, std::string connect_type)
477477
if (connect_type == "new")
478478
{
479479
id = res->getInt("id");
480+
if(res->getString("sender") ==me)
481+
continue;
480482
sql::PreparedStatement *updateStmt = con->prepareStatement(sql0To1);
481483
updateStmt->setInt(1, id);
482484
updateStmt->executeUpdate();

0 commit comments

Comments
 (0)