websocket_demo/libs/aws.py
def save_message(connection_id, epoch, message, channel='general'):
    """Save a message from a user"""
    item = {
        'pk': channel,
        'epoch': epoch,
        'connectionId': connection_id,
        'channel': channel,
        'message': message,
    }

    table = get_table()
    table.put_item(Item=item)
Save a message from a user
Save a message from a user
Save a message from a user
def save_message(connection_id, epoch, message, channel='general'):
    item = {
        'pk': channel,
        'epoch': epoch,
        'connectionId': connection_id,
        'channel': channel,
        'message': message,
    }
    table = get_table()
    table.put_item(Item=item)
def save_message ( connection_id , epoch , message , channel = 'general' ) : item = { 'pk' : channel , 'epoch' : epoch , 'connectionId' : connection_id , 'channel' : channel , 'message' : message , } table = get_table ( ) table . put_item ( Item = item )
Save a message from a user
Save a message from a user
"""Save a message from a user"""
connection_id
epoch
message
channel