This project is a chat client that implements the XMPP Protocol. This client is based on the python library slixmpp. Consist of two files, app.py, which is the main file and is in charge of showing the unauthenticated menu options to the user; and client.py, which is the XMPP Client custom implementation. The client make use of the following XEP Plugins:
- XEP-0004 - Data forms
- XEP-0030 - Service Discovery
- XEP-0045 - Multi-User Chat
- XEP-0066 - Out-of-band Data
- XEP-0071 - XHTML-IM
- XEP-0077 - In-band Registration
- XEP-0085 - Chat State Notifications
- XEP-0128 - Service Discovery Extensions
- XEP-0199 - XMPP Ping
- XEP-0363 - HTPP File Upload
-
Event: session_start
- This event is triggered when the client is connected and the user is logged in.
-
Event: register
- This event is triggered when the user is on registration process.
-
Event: message
- This event is triggered when the user receive a message of any type.
-
Event: chatstate_active
- This event is triggered when some user that we are chatting with set its chat state as active.
-
Event: chatstate_inactive
- This event is triggered when some user that we are chatting with set its chat state as inactive.
-
Event: chatstate_composing
- This event is triggered when some user that we are chatting with set its chat state as composing.
-
Event: chatstate_paused
- This event is triggered when some user that we are chatting with set its chat state as paused.
-
Event: chatstate_gone
- This event is triggered when some user that we are chatting with set its chat state as gone.
- init: class initializer, loads the event handlers.
- start: set initial presence status, update the user contacts, and show the menu options.
- load: update the state of the client, is usefull to know is there is new messages.
- authenticated_menu: print the menu.
- register: send the xmpp petition to register a new user.
- logout: disconnect the client and ends the authenticated flow.
- list_contacts: list all the user contacts.
- update_contacts: temporaly store of the user contacts extracted from the roster
- add_contacts: add a user to my roster (contact list)
- show_contact: show info of a specific contact
- chat: send a message to a specific user
- group_chat: send a message to a group chat
- join_group: join a group chat
- receive_message: get the messages and files received
- presence: set and send presence
- send_chat_status: send chat status
- receive_chatstate_active: receive chat state active
- receive_chatstate_inactive: receive chat state inactive
- receive_chatstate_composing: receive chat state composing
- receive_chatstate_paused: receive chat state paused
- receive_chatstate_gone: receive chat state gone
- send_file: upload and send a file
- destroy_account: destroy the current user account on the server
* Important: USE PYTHON 3.7
pip3 install -r requirements.txt
python app.py -q
Available menu options:
- Registration
- Login
- Logout
- Chat
- Join Group
- Group Chat
- Presence
- List Contacts
- Show Contact
- Add Contanct
- Send File
- Destroy Account