refactor: remove 'async', change lud16 to 'lightning'

environments/review-set-lightn-7857tt/deployments/4635
P. Reis 4 months ago
parent 203a084069
commit 23af35cb7e

@ -40,7 +40,7 @@ const getMeToken = (state: RootState) => {
};
const fetchMe = () =>
async (dispatch: AppDispatch, getState: () => RootState) => {
(dispatch: AppDispatch, getState: () => RootState) => {
const state = getState();
const token = getMeToken(state);
const accountUrl = getMeUrl(state);
@ -68,7 +68,7 @@ const persistAuthAccount = (account: APIEntity, params: Record<string, any>) =>
};
const patchMe = (params: Record<string, any>, isFormData = false) =>
async (dispatch: AppDispatch, getState: () => RootState) => {
(dispatch: AppDispatch, getState: () => RootState) => {
dispatch(patchMeRequest());
const headers: RawAxiosRequestHeaders = isFormData ? {

@ -129,8 +129,9 @@ interface AccountCredentials {
birthday?: string;
/** Nostr NIP-05 identifier. */
nip05?: string;
/** Lightning address.
* https://github.com/lnurl/luds/blob/luds/16.md */
/**
* Lightning address.
* https://github.com/lnurl/luds/blob/luds/16.md */
lud16?: string;
}
@ -359,7 +360,7 @@ const EditProfile: React.FC = () => {
</FormGroup>
)}
{features.accountLud16 && (
{features.lightning && (
<FormGroup
labelText={<FormattedMessage id='edit_profile.fields.lud16_label' defaultMessage='Lightning Address' />}
>

@ -157,12 +157,6 @@ const getInstanceFeatures = (instance: Instance) => {
v.software === DITTO,
]),
/**
* Ability to set one's lightning address on their profile.
* @see PATCH /api/v1/accounts/update_credentials
*/
accountLud16: v.software === DITTO,
/**
* Move followers to a different ActivityPub account.
* @see POST /api/pleroma/move_account
@ -704,6 +698,12 @@ const getInstanceFeatures = (instance: Instance) => {
v.software === PLEROMA && v.build === REBASED && gte(v.version, '2.5.54'),
]),
/**
* Ability to set one's lightning address on their profile.
* @see PATCH /api/v1/accounts/update_credentials
*/
lightning: v.software === DITTO,
/**
* Can create, view, and manage lists.
* @see {@link https://docs.joinmastodon.org/methods/lists/}

Loading…
Cancel
Save