X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcore%2FSQL%2FPostgreSQL%2F20%2Fupdate_buffer_lastseen.sql;h=98218a641afa04497caebd4abd039bdb432dda6f;hb=065ad418911de85ee1a94a178cd41ae32d0ac91e;hp=55415050908c2e5a800fda8d94a7ac52775a2de3;hpb=d682289cc69fac3a5776ef29059cc1f54d8d37d4;p=quassel.git diff --git a/src/core/SQL/PostgreSQL/20/update_buffer_lastseen.sql b/src/core/SQL/PostgreSQL/20/update_buffer_lastseen.sql index 55415050..98218a64 100644 --- a/src/core/SQL/PostgreSQL/20/update_buffer_lastseen.sql +++ b/src/core/SQL/PostgreSQL/20/update_buffer_lastseen.sql @@ -1,3 +1,3 @@ UPDATE buffer -SET lastseenmsgid = :lastseenmsgid +SET lastseenmsgid = min(:lastseenmsgid, buffer.lastmsgid) WHERE userid = :userid AND bufferid = :bufferid