|
|
@ -572,7 +572,7 @@ def show_books():
|
|
|
|
socketio.emit('channel-' + str(1), {
|
|
|
|
socketio.emit('channel-' + str(1), {
|
|
|
|
'username': 'Search form',
|
|
|
|
'username': 'Search form',
|
|
|
|
'text': search.search.data,
|
|
|
|
'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
|
|
|
|
# Save message
|
|
|
|
my_new_chat = Chat(message=newmsg)
|
|
|
|
my_new_chat = Chat(message=newmsg)
|
|
|
|
db.session.add(my_new_chat)
|
|
|
|
db.session.add(my_new_chat)
|
|
|
@ -638,7 +638,7 @@ def search_results(searchtype, query, viewby):
|
|
|
|
socketio.emit('channel-' + str(1), {
|
|
|
|
socketio.emit('channel-' + str(1), {
|
|
|
|
'username': 'Search form',
|
|
|
|
'username': 'Search form',
|
|
|
|
'text': search.search.data,
|
|
|
|
'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
|
|
|
|
# Save message
|
|
|
|
my_new_chat = Chat(message=newmsg)
|
|
|
|
my_new_chat = Chat(message=newmsg)
|
|
|
|
db.session.add(my_new_chat)
|
|
|
|
db.session.add(my_new_chat)
|
|
|
@ -885,7 +885,7 @@ def new_message(message):
|
|
|
|
emit('channel-' + str(message['channel']), {
|
|
|
|
emit('channel-' + str(message['channel']), {
|
|
|
|
'username': message['username'],
|
|
|
|
'username': message['username'],
|
|
|
|
'text': message['text'],
|
|
|
|
'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
|
|
|
|
broadcast=True
|
|
|
|
)
|
|
|
|
)
|
|
|
|