WordPress-Android icon indicating copy to clipboard operation
WordPress-Android copied to clipboard

Notifications: Correct comment notification 'action' block retrieval

Open roundhill opened this issue 11 years ago • 2 comments

The app is incorrectly looking for the comment actions in the last item in the array. It should instead look for a comment type block within the body, and grab the actions from that:

https://github.com/wordpress-mobile/WordPress-Android/blob/b52152bd09be90550a6a61b9d0c78d8d0e7085f2/WordPress/src/main/java/org/wordpress/android/models/Note.java#L234-L240

roundhill avatar Feb 13 '15 00:02 roundhill

Note from @dmsnell: should check that the comment block's id matches the id of the comment for which the notification is for. ie: take actions from the block in body where block.type == comment and block.meta.ids.comment == (top level) meta.ids.comment (for the possible future scenario of multiple comments (maybe include reply snippets?))

cc: @jleandroperez

chengfred avatar Feb 13 '15 00:02 chengfred

Ah, got it. Thanks

roundhill avatar Feb 13 '15 01:02 roundhill