Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pleroma NotificationType #2212

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions megalodon/src/pleroma/api_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ namespace PleromaAPI {
return NotificationType.Update
case PleromaNotificationType.Move:
return NotificationType.Move
case PleromaNotificationType.Status:
return NotificationType.Status
default:
return new UnknownNotificationTypeError()
}
Expand All @@ -100,6 +102,8 @@ namespace PleromaAPI {
return PleromaNotificationType.Update
case NotificationType.Move:
return PleromaNotificationType.Move
case NotificationType.Status:
return PleromaNotificationType.Status
default:
return new UnknownNotificationTypeError()
}
Expand Down
1 change: 1 addition & 0 deletions megalodon/src/pleroma/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace PleromaNotificationType {
export const FollowRequest: PleromaEntity.NotificationType = 'follow_request'
export const Update: PleromaEntity.NotificationType = 'update'
export const Move: PleromaEntity.NotificationType = 'move'
export const Status: PleromaEntity.NotificationType = 'status'
}

export default PleromaNotificationType
8 changes: 8 additions & 0 deletions megalodon/test/unit/pleroma/api_client.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ describe('api_client', () => {
{
src: MegalodonNotificationType.Move,
dist: PleromaNotificationType.Move
},
{
src: MegalodonNotificationType.Status,
dist: PleromaNotificationType.Status
}
]
cases.forEach(c => {
Expand Down Expand Up @@ -121,6 +125,10 @@ describe('api_client', () => {
{
src: PleromaNotificationType.Move,
dist: MegalodonNotificationType.Move
},
{
src: PleromaNotificationType.Status,
dist: MegalodonNotificationType.Status
}
]
cases.forEach(c => {
Expand Down