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

feat: Glitch-soc/Firefish emoji reactions API #1921

Merged
merged 11 commits into from
Sep 24, 2023

Conversation

@ThatOneCalculator ThatOneCalculator changed the title fix: Glitch-soc/Firefish emoji reactions API feat: Glitch-soc/Firefish emoji reactions API Sep 22, 2023
megalodon/src/firefish.ts Outdated Show resolved Hide resolved
@h3poteto
Copy link
Owner

Please pass tests.

@@ -5,6 +5,7 @@ namespace NotificationType {
export const Favourite: Entity.NotificationType = 'favourite'
export const Reblog: Entity.NotificationType = 'reblog'
export const Mention: Entity.NotificationType = 'mention'
export const Reaction: Entity.NotificationType = 'reaction'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you add a new notification type? Is it used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you add Reaction even though EmojiReaction exists? What's the difference?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly to stay in line with Firefish's reaction notification name. I don't think it's very necessary but helps with differentiating string-only reaction notifications (Pleroma) from Reaction object notifications

Copy link
Owner

@h3poteto h3poteto Sep 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I got it.
You mean
In Pleroma(current):
When we receive an EmojiReaction notification, it contains emoji field in the object (it does not contain reaction). And it should be NotificationType.EmojiReaction.
In Firefish:
When we receive a Reaction notification, it contains reaction field in the object (it does not contain emoji). And it should be NotificationType.Reaction.

Furthermore, in the future Pleroma, when we receive an EmojiReaction, it contains reaction field in the object instead of emoji field. And at that time, we can remove NotificationType.EmojiReaction and emoji field in the notification object.

Correct?

Copy link
Contributor Author

@ThatOneCalculator ThatOneCalculator Sep 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, exactly.

@ThatOneCalculator
Copy link
Contributor Author

I'll be able to address the review items later today :)

@ThatOneCalculator
Copy link
Contributor Author

Requesting review from @h3poteto , test only fails due to the Friendica server chosen for the detector test being down (see afd1be2)

Copy link
Owner

@h3poteto h3poteto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@h3poteto h3poteto merged commit 8115119 into h3poteto:master Sep 24, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants