Skip to content
Snippets Groups Projects

Fetching convos via MastoAPI

Merged HJ requested to merge mastoapi/convos into develop
  • Conversations now store which statuses they need to display instead of attempting to find statuses by statusnet_conversation_id (which mastoapi doesn't have)

Since MastoAPI doesn't support convesration id, we can't use current flow, and to be honest it's kinda slow.

Old conversation flow:

  • fetch relevant statuses
  • show all statuses that we know of that have same statusnet_conversation_id, this will update when new statuses are fetched This essentially O(n) since it's basically searching entire allStatuses for which statuses have needed convo id, if you have 4000+ statuses in memory this will get slow, but this allows dynamic update to conversations

New conversation flow:

  • fetch relevant statuses (MastoAPI works slightly different, providing "above" and "below" lists instead of one list, doesn't contain status)
  • temporarily store which statuses we should display from response data
  • display all relevant statuses by getting them from faster allStatusesObjects This will not automatically update unfortunately, but I think better mechanism could be implemented there.
Edited by HJ

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Shpuld Shpludson resolved all discussions

    resolved all discussions

  • Shpuld Shpludson
  • Shpuld Shpludson
  • Shpuld Shpludson
  • Looks fine to me apart from minor naming stuff. I honestly think mastoapi is pretty retarded when it comes to not having a proper conversation id. I tried thinking of ways to make the auto update work without massive hacks but it's not simple.

    anyway please merge it when you think it's appropriate, you know better what should be merged and in what order

  • Author Maintainer

    thanks

  • HJ added 44 commits

    added 44 commits

    Compare with previous version

  • HJ added 1 commit

    added 1 commit

    Compare with previous version

  • HJ resolved all discussions

    resolved all discussions

  • HJ merged

    merged

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading