8000 Fix epoch in send message by hickey · Pull Request #25 · hickey/meshchat · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix epoch in send message #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/Bug Report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ description: File a bug for the MeshChat project
title: "[Bug]: "
labels:
- bug
- needs triage
assignees:
- hickey
body:
Expand Down
8 changes: 4 additions & 4 deletions meshchat
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function send_message()
local message = query.message:gsub("\n", "\\n"):gsub('"', '\\"'):gsub("\t", " ")

local epoch = os.time()
if tonumber(query.epoch) > epoch then
if query.epoch and tonumber(query.epoch) > epoch then
epoch = query.epoch
end

Expand Down Expand Up @@ -467,7 +467,7 @@ end
function messages_version_ui()
print("Content-type: application/json\r")
print("\r")

print(string.format([[{"messages_version":%s}]], get_messages_db_version()))

get_lock()
Expand Down Expand Up @@ -511,7 +511,7 @@ end
function hosts()
print("Content-type: application/json\r")
print("\r")

local node = node_name()
local hosts = {}
for line in io.lines("/var/dhcp.leases")
Expand Down Expand Up @@ -562,7 +562,7 @@ end
function hosts_raw()
print("Content-type: application/json\r")
print("\r")

local hosts = {}
for line in io.lines("/var/dhcp.leases")
do
Expand Down
0