Git Product home page Git Product logo

microflack_messages's Introduction

MicroFlack's Messages Service

microflack_messages's People

Contributors

dependabot[bot] avatar miguelgrinberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

microflack_messages's Issues

Hints on extension for a multi-chat room app

Hey Miguel,
I do hope to not bore you (with all my questions), but I would be pleased if you have some hints for me on how to get started extending the microflack_app for a multi-chat room app.

The Design
I therefore extended each user with an additional roomid field. The idea is that everyone can login to a chat room with a roomid and can only see the messages inside the room. Additionally it should be possible to send from the server side messages to all users (broadcasting) inside a room and also to only specific clients.

The original message workflow is like this:
app.socket.emit('post_message', {source: args.message}, app.token.get('token'));
→ [socketio] : on_post_message(data, token)
→ [socketio] rv = requests.post('/api/messages', json=data, headers={'Authorization': 'Bearer ' + token},
→ [messages] @app.route('/api/messages', methods=['POST']) – def new_message():
→ [ui] if a new message is registered in the db it is rendered to the ui

Now what I wanted to do is to include
join_room, leave_room inside socketio. But currently socketio works with sending requests so I cannot use e.g.
emit('status', {'msg': session.get('name') + ' has entered the room.'}, room=room)
inside socketio. For this reason I wondered where I have to use the emit?
Do I have to handle diffrent rooms all on client side and should each message contain instead the roomid it is send to?

/app/wheels doesn't exist

When running docker build . -t mikroflak i get this error

ERROR: Could not find a version that satisfies the requirement MicroFlack-Common==0.3 (from -r /app/requirements.txt (line 22)) (from versions: none)
ERROR: No matching distribution found for MicroFlack-Common==0.3 (from -r /app/requirements.txt (line 22))
WARNING: Url '/app/wheels' is ignored. It is either a non-existing path or lacks a specific scheme.
The command '/bin/sh -c pip install --find-links /app/wheels -r /app/requirements.txt' returned a non-zero code: 1```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.