Skip to content
Snippets Groups Projects

Transition to MastoAPI: user profile settings

Merged Tae Hoon requested to merge tae/pleroma-fe:437-user-profile-settings into develop

Closes #437 (closed)

This is blocked until the API (/api/v1/accounts/update_credentials) supports these properties

default_scope,
no_rich_text,
hide_follows,
hide_followers,
show_role
Edited by Tae Hoon

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
  • Maintainer

    what about display name and bio?

  • Author Contributor

    well, when clicking the Submit button, they are updated along with the other profile options (except images) altogether. not really needed to make 2 different api calls...

  • Maintainer

    yeah but, like, you're still using /api/account/update_profile.json

  • Maintainer

    also i don't understand the whole refactoring going on there

  • Author Contributor

    yeah but, like, you're still using /api/account/update_profile.json

    What do you mean by this?

  • Author Contributor

    also i don't understand the whole refactoring going on there

    because the data format for images which the mastoAPI accepts is different than the one the legacy API accepts.

    • the legacy API accepts data url (e.g, the result of canvas.toDataURL)
    • the mastoAPI accepts file or blob (e.g, the result of canvas.toBlob)
  • Maintainer

    What do you mean by this?

    Issue is about transitioning all profile editing stuff to MastoAPI. Nickname, bio, avatar, banner, background and other options like "hide my followers". This MR only changes avatar and banner update, doesn't handle updating bio and nickname.

  • Author Contributor

    doesn't handle updating bio and nickname.

    as I mentioned before, they are updated along with the other profile options (e.g, no_rich_text) altogether triggered by only one user action (i.e, clicking the submit button).

    isn't it an overkill to send two API calls to handle one user action regardless we can do it using one call?

  • Maintainer

    Then remove the

    const PROFILE_UPDATE_URL = '/api/account/update_profile.json'
  • Author Contributor

    sorry! that's what we still need to use.

  • Author Contributor

    there is no mastoapi equivalent to that

    which accepts all options of that

    Edited by Tae Hoon
  • Maintainer

    Pass options that are accepted and pester BE folk to add missing ones! It's already mentioned in pleroma#674 (closed) too

  • Tae Hoon marked as a Work In Progress

    marked as a Work In Progress

  • Tae Hoon changed the description

    changed the description

  • Tae Hoon added 26 commits

    added 26 commits

    Compare with previous version

  • Tae Hoon added 1 commit

    added 1 commit

    • 37c3c3c8 - Switch to mastoapi for updating user profile

    Compare with previous version

  • Tae Hoon added 28 commits

    added 28 commits

    • 37c3c3c8...277790e4 - 25 commits from branch pleroma:develop
    • 2738259d - Switch to mastoapi for updating avatar
    • 2c6c088f - Switch to mastoapi for updating banner
    • 03414f09 - Switch to mastoapi for updating user profile

    Compare with previous version

  • Tae Hoon added 1 commit

    added 1 commit

    Compare with previous version

  • Tae Hoon changed the description

    changed the description

  • Tae Hoon added 33 commits

    added 33 commits

    Compare with previous version

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