Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic MAM support #1306

Merged
merged 11 commits into from
Apr 13, 2020
Merged

Add basic MAM support #1306

merged 11 commits into from
Apr 13, 2020

Commits on Apr 11, 2020

  1. First MAM test

    Send a request (which we can't handle yet) :-)
    
    Regards #660
    jubalh committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    fe9b520 View commit details
    Browse the repository at this point in the history
  2. Don't crash if we get a message without from or type

    MAM messages don't have a type nor a from.
    If we detect a message without type let's log it and exit without
    continuing to try to parse it.
    
    Otherwise we go into _handle_chat() and crash on the no from.
    jubalh committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    e878b6d View commit details
    Browse the repository at this point in the history
  3. _handle_chat: return if no 'from'

    Let's not crash :-)
    jubalh committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    f3b8cc4 View commit details
    Browse the repository at this point in the history
  4. First test with receiving MAM

    jubalh committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    38273fe View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e23bc38 View commit details
    Browse the repository at this point in the history
  6. Add to_jid field to ProfMessage struct

    Is usefult in many cases if we want cleaner code.
    Hope this edit didn't break anything though ;-)
    jubalh committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    180ec2b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    dd566d8 View commit details
    Browse the repository at this point in the history
  8. Get MAM since yesterday

    Later we will have several options.
    Getting everything since last timestamp (if none everything at all).
    Getting everything since today + configure time (1 week).
    
    Should also have a reload all command like conversations once you
    cleared the history.
    
    All MAM messages should be written into sql db.
    And then probably displayed from there so that regular history works
    too.
    jubalh committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    aedecee View commit details
    Browse the repository at this point in the history
  9. Check if server suppors MAM

    jubalh committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    98200eb View commit details
    Browse the repository at this point in the history
  10. Add hidden MAM setting and trigger MAM retrievel when opening new window

    Only when we start the conversation.
    Not yet when we get messaged and a new window is opened.
    Need to have sorting of messages in the window buffer then, I guess.
    Also MAM IQ should only be send one time in such a case.
    
    If MAM is enabled history from sql backend will not be shown.
    
    `mam` in profrc enables experimental MAM.
    Can change soon again. Don't rely on stuff in this stage ;)
    jubalh committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    5151849 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2020

  1. Free timestamp correctly

    g_date_time_add_days() actually creates a new one.
    jubalh committed Apr 13, 2020
    Configuration menu
    Copy the full SHA
    18c64c0 View commit details
    Browse the repository at this point in the history