diff --git a/mail_menu.c b/mail_menu.c index 2589ee6..41ab33f 100644 --- a/mail_menu.c +++ b/mail_menu.c @@ -776,7 +776,7 @@ void read_message(struct user_record *user, struct msg_headers *msghs, int mailn jlr.HighReadMsg = msghs->msgs[mailno]->msg_no; } - jlr.LastReadMsg = mailno; + jlr.LastReadMsg = msghs->msgs[mailno]->msg_no; if (jlr.HighReadMsg < msghs->msgs[mailno]->msg_no) { jlr.HighReadMsg = msghs->msgs[mailno]->msg_no; } diff --git a/www_msgs.c b/www_msgs.c index 87f8c47..b507b35 100644 --- a/www_msgs.c +++ b/www_msgs.c @@ -364,12 +364,12 @@ char *www_msgs_messageview(struct user_record *user, int conference, int area, i if (JAM_ReadLastRead(jb, user->id, &jlr) == JAM_NO_USER) { jlr.UserCRC = JAM_Crc32(user->loginname, strlen(user->loginname)); jlr.UserID = user->id; - jlr.HighReadMsg = msg; + jlr.HighReadMsg = msg - 1; } - jlr.LastReadMsg = msg; + jlr.LastReadMsg = msg - 1; if (jlr.HighReadMsg < msg) { - jlr.HighReadMsg = msg; + jlr.HighReadMsg = msg - 1; } JAM_WriteLastRead(jb, user->id, &jlr);