Skip to content

Commit

Permalink
Merge pull request #2212 from WakuwakuP/pleroma-notification-status
Browse files Browse the repository at this point in the history
Add Pleroma NotificationType
  • Loading branch information
h3poteto authored Sep 30, 2024
2 parents aea2459 + f6cb5d5 commit 108e2c7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
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

0 comments on commit 108e2c7

Please sign in to comment.