-
Notifications
You must be signed in to change notification settings - Fork 80
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
Improved comment-type handling #1072
Conversation
It now uses the comment-type as index and keeps a list of mapped activity-types. Also added a function to get the comment-type by the activity-type. `Comment::get_comment_type_by_activity_type ` props @obenland
With this change, |
Co-authored-by: Konstantin Obenland <obenland@gmx.de>
Covers new and unused methods, as well as deprecated ones
@@ -111,14 +111,13 @@ public static function add_reaction( $activity ) { | |||
return false; | |||
} | |||
|
|||
$type = $activity['type']; | |||
$comment_type = Comment::get_comment_type_by_activity_type( $activity['type'] ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could there ever be multiple comment types for an activity type? Is that something we have to worry about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so... there is the possibility that we might store items in different places (direct messages for example), but that is a different discussion...
It now uses the comment-type as index and keeps a list of mapped activity-types.
Also added a function to get the comment-type by the activity-type.
Comment::get_comment_type_by_activity_type
props @obenland