Code Monkey home page Code Monkey logo

moxxy's Introduction

Moxxy

An experimental XMPP client that tries to be as easy, modern and beautiful as possible.

The code is also available on Codeberg.

Get it on IzzyOnDroid

Or get the latest APK from Codeberg.

Screenshots

Building and Contributing

For build and contribution guidelines, please refer to CONTRIBUTING.md

Also, feel free to join the development chat at [email protected].

Translating

If you want to contribute by translating Moxxy, you can do that on Codeberg's Weblate instance.

Translation status

A Bit of History

This project is the successor of moxxyv1, which was written in React Native and abandoned due to various technical issues.

License

See ./LICENSE.

Special Thanks

Support

If you like what I do and you want to support me, feel free to donate to me on Ko-Fi.

moxxy's People

Contributors

coder-with-a-bushido avatar ikjot-2605 avatar millesimus avatar papatutuwawa avatar vistaus avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moxxy's Issues

Alpha 0.2.0

  • HTTP File Upload
  • Message Replies (XEP-0461)
    • Swipe to quote messages
    • Parse quotes
      • Requires the stanza handler rework
    • Display received replies in the UI
  • Message Receipts
  • #10
    • For images use photo_view
    • For other types, let the system handle it
  • Basic PubSub support
  • Profile Pictures
    • #9
    • Implement XEP-0083
    • Allow setting one's profile picture
    • Fetch own avatar after resumption/connection
    • Check if other avatar's have changed after login
    • Make the avatar path persist restarts
  • #6, except URL and GIF
  • Rework the StanzaHandler system to use priorities
    • Utilize this for
      • Chat markers
      • SIMS
      • SFS
      • OOB
      • Quotes
  • Chat states
    • Implement XEP-0085
      • Receiving
      • Sending
    • Build the UI for it
    • Make sure that the chat state is known in the service so that it does not disappear when switching chats
      • => ConversationService
  • Implement big rounded buttons
  • Make the conversation list item prettier
  • Implement user blocking
    • Implement XEP-0191
    • Plug into the UI
  • Implement the sent marker in the chat bubbles
  • Somehow deal with subscription requests
  • Delivery receipts appear to not find the messages they are for
    • This could be an issue with gajim as gajim does not advertise urn:xmpp:sid:0 and we ignore their <origin-id /> element
    • For some reason isar does not find the message even though it should be commited
  • The download service probably always sets the unread counter to 1 instead of incrementing it
  • Look into a possible race condition in the stream management code
    • Lock the state before each commit and discard the current commit if the s2c/c2s counters are bigger or equal
    • There also is the issue of modifying the list while iterating, which is bad
  • The blocklist desynced once
  • Cache the blocklist and replace it once we requested it again
  • #8
  • Steal code from here
    • Also see here for detecting the bottom of the ListView
  • Allow migrations between state versions
  • Rework the communication between the background and UI isolates
    • Use freezed to generate all classes
  • Let the XmppService use an EventHandler
  • Quotes go missing in the UI if the message is updated, e.g. if it is marked as read
  • Don't run the disco procedure if we resume and have it cached
  • A conversation update does not update the profile page
  • The switch for auto-download on Wifi is inverted
  • The order of the shared media display is wrong
  • If the stream manager cannot send a stanza (due to the map being changed while iterating), then the "queue" will grow indefinetely
  • The alt text of the avatar widget does not scale with the size of the background circle
  • Fix (most) linter warnings
  • Fix a carbon of a sent message appearing as its own chat
  • Sending a message should clear the quoted message
  • Empty messages appear (presumably chat states)
    • Implement a metric that decides if a MessageEvent should be treated as a message or not
  • Sometimes messages duplicate and persist
  • Setting the chat background does not work
  • Swiping a conversation does nothing
  • The background service appears to send conversation updates often
  • It looks like closure of the socket is not detected by the code
  • Fix tests
  • Clean the service message handler
  • Remove all caching code from the database service and move them into their own separate services
    • ConversationService
    • MessageService
    • RosterService
  • Background images do not seem to work
  • When downloading a file, the download will crash if the file already exists
  • Open chat, switch app: Notifications won't be created
  • Thumbnails should be stored in the cache directory, not in the gallery
  • Generate thumbnails directly after the download in a separate isolate
  • Generate video thumbnails in a different isolate
  • Cache video thumbnails
  • Make all media widgets clickable
  • The loading spinner does not appear when downloading a file
  • Only send client state updates when we are connected
  • Reset the SM state after disconnecting
  • The ping timer continues to run after the connection dropped
    • Maybe fixed by the detection of the socket closure
  • Add transition animations between pages
    • Slide from right for the transition "conversations list <-> conversation view"
    • Hero for the transition "conversations list <-> Self-profile"
    • Hero for the transition "conversation view <-> Profile"
    • The hero animations are a bit janky as the background around the AvatarWrapper is also shown
      • Move the Hero into the AvatarWrapper and make it wrap only the avatar image
  • Messages do not appear in the chat if the chat was closed or if you are in the chat, close it and reopen it
  • Implement a cache eviction policy for the caches
    • thumbnail cache
    • conversation cache
    • message cache
  • Cache images in the chat using the ThumbnailService
  • Change the avatar strategy from [base]/avatars/[bare JID]_[hash].png to [base]/avatars/[hash].png
    • Allows us to reduce the time avatars have to be requested if people share avatars
  • Add an info page that shows if all recommended XEPs are discovered on the server
  • Highlight "legacy" quotes in the chat bubble
  • Add another event to XmppConnection which triggers after the login is done and we finished the initial discovery process to prevent a request for the blocklist failing because we haven't yet discovered that the server supports it
    • Remove the GetFeaturesCommand and let just the event update the profile bloc
  • Keep track of roster items' avatar hashes
  • Replace the cropping library with one that gives more flexibility
  • The image widget should have a background until the image is loaded into the cache
  • Add a page that shows all shared media in a conversation
  • Messages are not marked as acked because they cannot be found
  • Maybe navigate first to the conversation and then request the messages

Media Display

Media type Chat bubble Quote reply Shared Media list
Image ✔️ ✔️ ✔️
Video ✔️ ✔️ ✔️
File ✔️ ✔️ ✔️
Audio
URL N/A

Pre-Alpha 0.0.2 Tasks

  • Replace basic_utils with my own DNS library
  • Work through most TODOs
  • When started after booting, the app is stuck on the splash screen (Could be because the PrestartResult is not triggered)
  • Figure out a better logging system (Maybe do something like Monal)
  • Move lib/redux/ into lib/ui/
  • Move lib/repositories/ into lib/service/
  • Move lib/db/ into lib/service/
  • Move lib/models/ into lib/shared/
  • Move lib/data/ into lib/ui/
  • Remove lib/backend by moving the account "backend" into XmppRepository
  • Finally fix the sizing of UI elements
  • Remove widget specific theming and do it globally
  • Put the SplashScreenPage into its own file
  • Have all navigation routes defined as a constant
  • Don't have the data listener for the background service in lib/main.dart
  • Fix a bug that causes us to flood the server with presence data
  • Move the stream buffering into the TCPSocket
  • Fix tests not working because of a hard dependency on moxdns
  • Finish the roster code
    • Rework the roster code
  • #4
  • Use freezed on all data classes that need to get serialized/deserialized
  • Create a DiscoCacheManager
  • Rename all *Repositories to *Service and the root "XmppService" to MainService
  • The xmpp code appears to keep sending a roster bind for some time after login (?)
  • Roster items appear multiple times on the new chat screen
  • The roster is requested after a stream resumption

Stream Management triggers stream error

After letting the client idle for a long time, reconnection is impossible.

// Resumption fails
// Resource binding succeeds
I/flutter (29566): [S] ==> <enable xmlns='urn:xmpp:sm:3' resume='true' />
I/flutter (29566): [S2F] {type: ConnectionStateEvent, state: notConnected}
I/flutter (29566): [S] (xml) <== <stream:error ><unsupported-stanza-type xmlns='urn:ietf:params:xml:ns:xmpp-streams' /></stream:error>
I/flutter (29566): [S] (xml) <== <stream:stream  /

Note: path is pinned to version 1.8.3 by flutter_localizations from the flutter SDK.

[moxxy] flutter pub get
Resolving dependencies...
Note: path is pinned to version 1.8.3 by flutter_localizations from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.

Because moxxyv2 depends on flutter_localizations from sdk which depends on path 1.8.3, path 1.8.3 is required.
So, because moxxyv2 depends on path 1.8.2, version solving failed.

You can try the following suggestion to make the pubspec resolve:

  • Try an upgrade of your constraints: flutter pub upgrade --major-versions
    exit code 1

Roadmap

Pre-Alpha 0.0.1

  • Improve tests
    • Test every XEP implemented
    • Add tests for connection failures/unexpected events
  • Make the linter happy
  • Stub out not implemented features
    • Registration
    • Image sending preview
  • Fix service crashing when the service is started on boot
  • Fix connection failing after boot It's not failing, the notification is just wrongly set to "disconnected"
  • Pull the Moxxy specific bits out of lib/xmpp/xeps/xep_0030.dart and lib/xmpp/xeps/xep_0115.dart

Pre-Alpha 0.0.2

See #3

Alpha 0.1.0

See #5

Alpha 0.2.0

See #7

Concrete Things To Be Done

  • Figure out a better logging system (Maybe do something like Monal)
  • Work through most TODOs
  • Remove widget specific theming and do it globally
  • Finally fix the sizing of UI elements
  • #4
  • Group notifications
  • Tapping a message notification should take you to the respective chat
  • Better management of presence subscriptions
    • We should strive to achieve a "both" subscription
  • Sometimes messages repeat after hot-restarting?
    • It this just a development problem?
  • Every media file updates the last message body to "Image"
  • Send Chat Markers (and make that configurable)
  • Images sometimes have their upper left corner not rounded enough
  • Rework the communication of foreground app code and the background services
    • Maybe have a single event class that bundles other classes?
  • There might still be a reconnection issue
  • Replace the StanzaHandler system with the EventHandler
  • Replace the custom awaitable implementation with the AwaitableDataSender
  • Everytime the conversation page is updated, the list gets re-created and thus widgets get recreated => Split up the page into two BlocBuilders

At Some Point

  • Message styling
  • OMEMO
  • Message Reactions
  • Stickers
  • Optimize startup time
    • Maybe move the XMPP code into it's own thread still
  • Switch to semver instead of just doing whatever
  • Make registration possible
    • IBR
    • Easy User Onboarding
    • Allow creating invites?
  • Groupchats (MUC or MIX?)
  • MAM
  • Notify the user if the connection is lost after waiting 30 minutes with no reconnection
  • Push Notifications
  • Chat backgrounds
  • i18n
  • Animations
  • Extract lib/xmpp into its own library
    • Only after OMEMO is implemented as OMEMO requires a big rework of the StanzaHandler system to allow them to pass data between each other and also intercept stanzas before they are sent
  • Link Previews

Perhaps

  • BoSH and/or WebSockets
  • iOS
    • Replace Android specific code with cross-platform code

Interesting Flutter Packages

  • photo_view: For allowing users to tap an image and see it bigger
  • flutter_blurhash: Maybe "extend" XEP-0385 to allow the usage of blurhash as a thumbnail
  • another_flushbar: To replace our custom snackbar
  • video_thumbnail: To generate a thumbnail after downloading/before uploading a video

[FEATURE REQUEST] JMP.chat features from Soprani.ca's Cheogram app

This app is everything I've been searching for with XMPP on Android, but I wanted to know if there were 2 features you could copy from Cheogram, which is the recommended app for XMPP-based phone service JMP.chat. Those features being contact integration w/ your local contacts (most clients seem to have this for 1-1 convos but fail to get names for group chats) and integration with the native Android phone dialer app.

Cheogram is fully open-source so it might be as easy as copying/pasting some code (though I doubt it's that easy). https://git.singpolyma.net/cheogram

Obviously this is just a request, but I would love it if these could be done some time down the road.

SCRAM-SHA-1-PLUS + SCRAM-SHA-256-PLUS + SCRAM-SHA-512-PLUS + SCRAM-SHA3-512(-PLUS) supports

To have compatibility with XMPP Servers and after:

  • SCRAM-SHA-1
  • SCRAM-SHA-256
  • SCRAM-SHA-512

Can you add supports of :

  • SCRAM-SHA-1-PLUS
  • SCRAM-SHA-224
  • SCRAM-SHA-224-PLUS
  • SCRAM-SHA-256-PLUS
  • SCRAM-SHA-384
  • SCRAM-SHA-384-PLUS
  • SCRAM-SHA-512-PLUS
  • SCRAM-SHA3-512
  • SCRAM-SHA3-512-PLUS

"When using the SASL SCRAM mechanism, the SCRAM-SHA-256-PLUS variant SHOULD be preferred over the SCRAM-SHA-256 variant, and SHA-256 variants [RFC7677] SHOULD be preferred over SHA-1 variants [RFC5802]".

https://xmpp.org/extensions/inbox/hash-recommendations.html

-PLUS variants:

IMAP:

LDAP:

  • RFC5803: Lightweight Directory Access Protocol (LDAP) Schema for Storing Salted: Challenge Response Authentication Mechanism (SCRAM) Secrets: https://tools.ietf.org/html/rfc5803

HTTP:

2FA:

IANA:

Linked to:

Error!

lib/service/omemo/omemo.dart:80:33: Error: The method 'call' isn't defined for the class 'bool'.
Try correcting the name to the name of an existing method, or defining a method named 'call'.
await commitTrustManager(await omemoManager.trustManager.toJson());

Alpha 0.1.0

  • The basis for a lot of XEPs: XEP-0359
  • Inline media display using OOB data
    • Implement XEP-0066
    • Keep track of downloaded media
    • Tell the UI about the downloaded media
    • Update the notification with the image
    • The last message text should say ":framed_picture: Image" instead of the URL
    • Same for the Notification
  • Add received media to the conversation's shared media
  • Handle other cases of media
    • (UI) Handle files
    • (UI) Handle videos
    • (UI) Handle media from JIDs not in our roster
    • (UI) Show placeholder while downloading file
      • Spinner while downloading
      • Thumbnail behind spinner if available
    • Handle SIMS?
    • Handle Stateless File Sharing instead of SIMS?
      • Maybe actually prefer this since it will be relevant once we implement stickers
  • Place downloaded files according to their mime type
    • Images into the gallery
    • Videos into the gallery (blocked by dependency issue; See TODO in the download service)
    • Files into the download folder
    • Handle permissions
  • Implement download restrictions
    • e.g. Download automatically only when on wifi
    • Maximum file size for automatic downloads
  • Make the chatbubble render a progress bar if we're downloading it currently
    • The bubble should register itself against a DownloadProgressManager that notifies it on progress changes
  • New messages disappear after leaving the conversation and opening it again
  • Roster items still multiply?
    • Maybe just send a diff to the UI
  • Chat markers
  • Make sending of delivery receipts optional
  • Group notifications
  • Message Carbons
    • Implement XEP-0297's forwarded element
    • Implement the handling logic for the message carbons
    • Add a test to test for the Message Carbon CVEs
  • Database encryption
  • Tapping a message notification should take you to the respective chat
  • StartTLS
  • Implement a prefered resumption location in the stream manager
  • Fix the license build script
  • Fix the spacing and padding of images and the general chatbubble
    • The distance to the previous message should always be the same
  • The notification shows when receiving an image and the chat is currently opened
  • Images sometimes have their upper left corner not rounded enough
  • Fix the stanza Id being "" in the database model when we send a message
  • Change the icon of the background notification
  • Raise the time until we ping the connection to 10, maybe even 15 minutes
  • Cleanup tasks
    • Port S2F events to classes
    • Port F2S commands to classes
  • Fix TLS connections if the SRV record for server.example points to xmpp.server.example (Provide the SecureSocket with onBadCertificate)
  • Add buttons for adding the contact and blocking the contact to the ConversationPage if the contact is not in the roster
  • Close chat, Remove contact from roster, add contact to roster => Chat is gone until you go back and re-open the chat
  • Improve the Stream Management implementation: Keep each Stanza in the queue for ~10 seconds, if it has not been acked until then, until we re-send it
  • Chat backgrounds
  • Make the StreamManagementManager emit an Event whenever a message has been acked
  • The roster still appears to be a bit broken, e.g. adding a contact is sometimes not reflected
  • Tapping a roster item in the "New Chat" page does nothing

UI Rework

Migrate from redux to bloc

  • Port over flutter_redux_navigation to Bloc
  • Make the communication between the background service and the Bloc awaitable
  • Convert all pages to Bloc
  • Improve the code quality of the inline chat widgets
  • Let MessageBubbleBottom handle setting up and tearing down the timers to prevent the entire widget from being redrawn
    • Fixes video media widgets from flickering every minute

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.