File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,9 +9,10 @@ import { addMessage } from "../services/message";
99export default async function (
1010 msg : Message ,
1111 _newBody : string ,
12- prevBody : string
12+ prevBody : string ,
1313) {
14- if ( msg . fromMe ) return ;
14+ if ( msg . fromMe || msg . timestamp < Date . now ( ) / 1000 - 10 ) return ;
15+
1516 // const isGroup = !!msg.author;
1617 // const user = await getUserbyLid(msg.from) || "Your";
1718 if ( prevBody ) await addMessage ( msg , prevBody , "edit" ) ;
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import sleep from "../../utils/sleep";
44
55export default async function ( notif : GroupNotification ) {
66 try {
7+ if ( notif . timestamp < Date . now ( ) / 1000 - 10 ) return ;
78 const group = await notif . getChat ( ) ;
89 const recipients = await notif . getRecipients ( ) ;
910
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import sleep from "../../utils/sleep";
44
55export default async function ( notif : GroupNotification ) {
66 try {
7+ if ( notif . timestamp < Date . now ( ) / 1000 - 10 ) return ;
78 const group = await notif . getChat ( ) ;
89 const recipients = await notif . getRecipients ( ) ;
910
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { addMessage } from "../services/message";
88 */
99export default async function ( msg : Message , revoked_msg ?: Message ) {
1010 if ( msg . fromMe || ! revoked_msg ) return ;
11+ if ( msg . timestamp < Date . now ( ) / 1000 - 10 ) return ;
1112 // const isGroup = !!msg.author;
1213 // const user = (await getUserbyLid(msg.from)) || "Your";
1314 await addMessage ( msg , revoked_msg ?. body , "revoke" ) ;
You can’t perform that action at this time.
0 commit comments