forked from mastodon/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2758 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes up to 2c7eed1
- Loading branch information
Showing
14 changed files
with
108 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { apiRequest } from 'flavours/glitch/api'; | ||
import { apiRequestPost } from 'flavours/glitch/api'; | ||
import type { ApiRelationshipJSON } from 'flavours/glitch/api_types/relationships'; | ||
|
||
export const apiSubmitAccountNote = (id: string, value: string) => | ||
apiRequest<ApiRelationshipJSON>('post', `v1/accounts/${id}/note`, { | ||
apiRequestPost<ApiRelationshipJSON>(`v1/accounts/${id}/note`, { | ||
comment: value, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { apiRequest } from 'flavours/glitch/api'; | ||
import { apiRequestPost } from 'flavours/glitch/api'; | ||
import type { Status, StatusVisibility } from 'flavours/glitch/models/status'; | ||
|
||
export const apiReblog = (statusId: string, visibility: StatusVisibility) => | ||
apiRequest<{ reblog: Status }>('post', `v1/statuses/${statusId}/reblog`, { | ||
apiRequestPost<{ reblog: Status }>(`v1/statuses/${statusId}/reblog`, { | ||
visibility, | ||
}); | ||
|
||
export const apiUnreblog = (statusId: string) => | ||
apiRequest<Status>('post', `v1/statuses/${statusId}/unreblog`); | ||
apiRequestPost<Status>(`v1/statuses/${statusId}/unreblog`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import { apiRequest } from 'flavours/glitch/api'; | ||
import { apiRequestGet, apiRequestPut } from 'flavours/glitch/api'; | ||
import type { NotificationPolicyJSON } from 'flavours/glitch/api_types/notification_policies'; | ||
|
||
export const apiGetNotificationPolicy = () => | ||
apiRequest<NotificationPolicyJSON>('GET', '/v1/notifications/policy'); | ||
apiRequestGet<NotificationPolicyJSON>('/v1/notifications/policy'); | ||
|
||
export const apiUpdateNotificationsPolicy = ( | ||
policy: Partial<NotificationPolicyJSON>, | ||
) => | ||
apiRequest<NotificationPolicyJSON>('PUT', '/v1/notifications/policy', policy); | ||
) => apiRequestPut<NotificationPolicyJSON>('/v1/notifications/policy', policy); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { apiRequest } from 'mastodon/api'; | ||
import { apiRequestPost } from 'mastodon/api'; | ||
import type { ApiRelationshipJSON } from 'mastodon/api_types/relationships'; | ||
|
||
export const apiSubmitAccountNote = (id: string, value: string) => | ||
apiRequest<ApiRelationshipJSON>('post', `v1/accounts/${id}/note`, { | ||
apiRequestPost<ApiRelationshipJSON>(`v1/accounts/${id}/note`, { | ||
comment: value, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { apiRequest } from 'mastodon/api'; | ||
import { apiRequestPost } from 'mastodon/api'; | ||
import type { Status, StatusVisibility } from 'mastodon/models/status'; | ||
|
||
export const apiReblog = (statusId: string, visibility: StatusVisibility) => | ||
apiRequest<{ reblog: Status }>('post', `v1/statuses/${statusId}/reblog`, { | ||
apiRequestPost<{ reblog: Status }>(`v1/statuses/${statusId}/reblog`, { | ||
visibility, | ||
}); | ||
|
||
export const apiUnreblog = (statusId: string) => | ||
apiRequest<Status>('post', `v1/statuses/${statusId}/unreblog`); | ||
apiRequestPost<Status>(`v1/statuses/${statusId}/unreblog`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import { apiRequest } from 'mastodon/api'; | ||
import { apiRequestGet, apiRequestPut } from 'mastodon/api'; | ||
import type { NotificationPolicyJSON } from 'mastodon/api_types/notification_policies'; | ||
|
||
export const apiGetNotificationPolicy = () => | ||
apiRequest<NotificationPolicyJSON>('GET', '/v1/notifications/policy'); | ||
apiRequestGet<NotificationPolicyJSON>('/v1/notifications/policy'); | ||
|
||
export const apiUpdateNotificationsPolicy = ( | ||
policy: Partial<NotificationPolicyJSON>, | ||
) => | ||
apiRequest<NotificationPolicyJSON>('PUT', '/v1/notifications/policy', policy); | ||
) => apiRequestPut<NotificationPolicyJSON>('/v1/notifications/policy', policy); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,7 @@ | |
:hr, | ||
:hu, | ||
:hy, | ||
:ia, | ||
:id, | ||
:ie, | ||
:ig, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters