mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-10 07:08:05 -05:00
wallet: when calculating pseudo message ids, use the timestamp before we apply adjustment
This commit is contained in:
@@ -345,14 +345,15 @@ impl LocalDarkIRC {
|
||||
}
|
||||
|
||||
// This is a hack to make messages appear sequentially in the UI
|
||||
let mut adj_timest = timest;
|
||||
let now_timest = UNIX_EPOCH.elapsed().unwrap().as_millis() as u64;
|
||||
if timest.abs_diff(now_timest) < RECENT_TIME_DIST {
|
||||
debug!(target: "darkirc", "Applied timestamp correction: <{timest}> => <{now_timest}>");
|
||||
timest = now_timest;
|
||||
adj_timest = now_timest;
|
||||
}
|
||||
|
||||
let mut arg_data = vec![];
|
||||
timest.encode_async(&mut arg_data).await.unwrap();
|
||||
adj_timest.encode_async(&mut arg_data).await.unwrap();
|
||||
privmsg.msg_id(timest).encode_async(&mut arg_data).await.unwrap();
|
||||
privmsg.nick.encode_async(&mut arg_data).await.unwrap();
|
||||
privmsg.msg.encode_async(&mut arg_data).await.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user