Skip to content
Snippets Groups Projects
Commit 46d526f7 authored by Eric Oulashin's avatar Eric Oulashin
Browse files

DD Msg Reader: Mark personal email as read if the user is just reading personal email

parent f689169a
No related branches found
No related tags found
2 merge requests!463MRC mods by Codefenix (2024-10-20),!357DD Msg Reader: Mark personal email as read if the user is just reading personal email
Pipeline #4859 passed
...@@ -48,6 +48,8 @@ ...@@ -48,6 +48,8 @@
* Fix in reader mode for refreshing the message area after * Fix in reader mode for refreshing the message area after
* closing another window (necessary with recent changes to * closing another window (necessary with recent changes to
* substrWithAttrCodes()) * substrWithAttrCodes())
* 2023-11-01 Eric Oulashin Version 1.85
* Mark personal email as read if the user is just reading personal email
*/ */
   
"use strict"; "use strict";
...@@ -152,8 +154,8 @@ var ansiterm = require("ansiterm_lib.js", 'expand_ctrl_a'); ...@@ -152,8 +154,8 @@ var ansiterm = require("ansiterm_lib.js", 'expand_ctrl_a');
   
   
// Reader version information // Reader version information
var READER_VERSION = "1.84"; var READER_VERSION = "1.85";
var READER_DATE = "2023-10-26"; var READER_DATE = "2023-11-01";
   
// Keyboard key codes for displaying on the screen // Keyboard key codes for displaying on the screen
var UP_ARROW = ascii(24); var UP_ARROW = ascii(24);
...@@ -4856,10 +4858,9 @@ function DigDistMsgReader_ReadMessageEnhanced(pOffset, pAllowChgArea) ...@@ -4856,10 +4858,9 @@ function DigDistMsgReader_ReadMessageEnhanced(pOffset, pAllowChgArea)
retObj.msgNotReadable = !isReadableMsgHdr(msgHeader, this.subBoardCode); retObj.msgNotReadable = !isReadableMsgHdr(msgHeader, this.subBoardCode);
if (retObj.msgNotReadable) if (retObj.msgNotReadable)
return retObj; return retObj;
// Mark the message as read if it was written to the current user // Mark the message as read if reading personal email or if it was written to the current user
var personalEmailToCurrentSysopUser = this.readingPersonalEmail && user.is_sysop && msgHeader.to.toUpperCase().indexOf("SYSOP") == 0; if (this.readingPersonalEmail || ((msgHeader.attr & MSG_READ) == 0) && (userHandleAliasNameMatch(msgHeader.to)))
if (((msgHeader.attr & MSG_READ) == 0) && (userHandleAliasNameMatch(msgHeader.to) || personalEmailToCurrentSysopUser))
{ {
// Using applyAttrsInMsgHdrInMessagbase(), which loads the header without // Using applyAttrsInMsgHdrInMessagbase(), which loads the header without
// expanded fields and saves the attributes with that header. // expanded fields and saves the attributes with that header.
...@@ -4867,6 +4868,9 @@ function DigDistMsgReader_ReadMessageEnhanced(pOffset, pAllowChgArea) ...@@ -4867,6 +4868,9 @@ function DigDistMsgReader_ReadMessageEnhanced(pOffset, pAllowChgArea)
if (this.SearchTypePopulatesSearchResults() && saveRetObj.saveSucceeded) if (this.SearchTypePopulatesSearchResults() && saveRetObj.saveSucceeded)
this.RefreshHdrInSavedArrays(pOffset, MSG_READ, true); this.RefreshHdrInSavedArrays(pOffset, MSG_READ, true);
} }
// For personal email, if we wanted to really check that it was written to the current sysop user:
//var personalEmailToCurrentSysopUser = this.readingPersonalEmail && user.is_sysop && msgHeader.to.toUpperCase().indexOf("SYSOP") == 0;
//if (((msgHeader.attr & MSG_READ) == 0) && (userHandleAliasNameMatch(msgHeader.to) || personalEmailToCurrentSysopUser))
   
// Updating message pointers etc. // Updating message pointers etc.
updateScanPtrAndOrLastRead(this.subBoardCode, msgHeader, this.doingMsgScan); updateScanPtrAndOrLastRead(this.subBoardCode, msgHeader, this.doingMsgScan);
......
Digital Distortion Message Reader Digital Distortion Message Reader
Version 1.84 Version 1.85
Release date: 2023-10-26 Release date: 2023-11-01
by by
......
...@@ -5,6 +5,8 @@ Revision History (change log) ...@@ -5,6 +5,8 @@ Revision History (change log)
============================= =============================
Version Date Description Version Date Description
------- ---- ----------- ------- ---- -----------
1.85 2023-11-01 Mark personal email as read if the user is just reading
personal email
1.84 2023-10-26 Fix in reader mode for refreshing the message area after 1.84 2023-10-26 Fix in reader mode for refreshing the message area after
closing another window (necessary with recent changes to closing another window (necessary with recent changes to
substrWithAttrCodes()) substrWithAttrCodes())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment