stop blank messages from being sent #5

Closed
carsand101 wants to merge 3 commits from main into main
1 changed files with 8 additions and 11 deletions
Showing only changes of commit 232798fa17 - Show all commits

9
main
View File

@ -223,13 +223,10 @@ def chatsend(roomid):
}, 403 }, 403
conn = get_db_connection() conn = get_db_connection()
if not content.isspace(): conn.execute("INSERT INTO chatmessages (content, chatroom_id, creator, created) VALUES (?, ?, ?, ?)",
conn.execute("INSERT INTO chatmessages (content, chatroom_id, creator, created) VALUES (?, ?, ?, ?)",
(content, roomid, userCookie["id"], str(time.time()))) (content, roomid, userCookie["id"], str(time.time())))
conn.commit() conn.commit()
conn.close() conn.close()
else:
# do something
global burgerMessageCache global burgerMessageCache
global burgerMessageUpdate global burgerMessageUpdate