Skip to content

Commit

Permalink
Merge pull request #1983 from h3poteto/fix/duplicate-method
Browse files Browse the repository at this point in the history
Use getPreferences instead of getDefaultPostVisibility
  • Loading branch information
h3poteto authored Oct 16, 2023
2 parents 736ad83 + f3f05be commit 11bbf99
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 28 deletions.
2 changes: 1 addition & 1 deletion megalodon/src/firefish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ export default class Firefish implements MegalodonInterface {
})
}

public async getDefaultPostPrivacy(): Promise<Entity.Preferences['posting:default:visibility']> {
private async getDefaultPostPrivacy(): Promise<Entity.Preferences['posting:default:visibility']> {
return this.client
.post<string>('/api/i/registry/get-unsecure', {
key: 'defaultNoteVisibility',
Expand Down
7 changes: 0 additions & 7 deletions megalodon/src/friendica.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1145,13 +1145,6 @@ export default class Friendica implements MegalodonInterface {
})
}

public async getDefaultPostPrivacy(): Promise<Entity.Preferences['posting:default:visibility']> {
return new Promise((_, reject) => {
const err = new NotImplementedError('Friendica does not support this method')
reject(err)
})
}

// ======================================
// accounts/followed_tags
// ======================================
Expand Down
7 changes: 0 additions & 7 deletions megalodon/src/mastodon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1403,13 +1403,6 @@ export default class Mastodon implements MegalodonInterface {
})
}

public async getDefaultPostPrivacy(): Promise<Entity.Preferences['posting:default:visibility']> {
return new Promise((_, reject) => {
const err = new NotImplementedError('Mastodon does not support this method')
reject(err)
})
}

// ======================================
// accounts/followed_tags
// ======================================
Expand Down
6 changes: 0 additions & 6 deletions megalodon/src/megalodon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -602,12 +602,6 @@ export interface MegalodonInterface {
*/
getPreferences(): Promise<Response<Entity.Preferences>>

/**
* Get the default post privacy defined by the user in their account settings. Firefish only.
*
* @return Preferences.
*/
getDefaultPostPrivacy(): Promise<Entity.Preferences['posting:default:visibility']>
// ======================================
// accounts/followed_tags
// ======================================
Expand Down
7 changes: 0 additions & 7 deletions megalodon/src/pleroma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1400,13 +1400,6 @@ export default class Pleroma implements MegalodonInterface {
})
}

public async getDefaultPostPrivacy(): Promise<Entity.Preferences['posting:default:visibility']> {
return new Promise((_, reject) => {
const err = new NotImplementedError('Pleroma does not support this method')
reject(err)
})
}

// ======================================
// accounts/followed_tags
// ======================================
Expand Down

0 comments on commit 11bbf99

Please sign in to comment.