|
|
@ -572,7 +572,7 @@ def show_books(): |
|
|
|
socketio.emit('channel-' + str(1), { |
|
|
|
'username': 'Search form', |
|
|
|
'text': search.search.data, |
|
|
|
'time': str(datetime.datetime.utcnow().strftime("%d.%m.%Y %H:%M"))}, broadcast=True) |
|
|
|
'time': str(datetime.datetime.now().strftime("%d.%m.%Y %H:%M"))}, broadcast=True) |
|
|
|
# Save message |
|
|
|
my_new_chat = Chat(message=newmsg) |
|
|
|
db.session.add(my_new_chat) |
|
|
@ -638,7 +638,7 @@ def search_results(searchtype, query, viewby): |
|
|
|
socketio.emit('channel-' + str(1), { |
|
|
|
'username': 'Search form', |
|
|
|
'text': search.search.data, |
|
|
|
'time': str(datetime.datetime.utcnow().strftime("%d.%m.%Y %H:%M"))}, broadcast=True) |
|
|
|
'time': str(datetime.datetime.now().strftime("%d.%m.%Y %H:%M"))}, broadcast=True) |
|
|
|
# Save message |
|
|
|
my_new_chat = Chat(message=newmsg) |
|
|
|
db.session.add(my_new_chat) |
|
|
@ -885,7 +885,7 @@ def new_message(message): |
|
|
|
emit('channel-' + str(message['channel']), { |
|
|
|
'username': message['username'], |
|
|
|
'text': message['text'], |
|
|
|
'time': str(datetime.datetime.utcnow().strftime("%d.%m.%Y %H:%M")) |
|
|
|
'time': str(datetime.datetime.now().strftime("%d.%m.%Y %H:%M")) |
|
|
|
}, |
|
|
|
broadcast=True |
|
|
|
) |
|
|
|