Previously, announcements.isTombstoneAnnouncement() threw errors like the activity content validations which is inconsistent with the behavior of the other announcement validations.
#179304918
Solution
Updated announcements.isTombstoneAnnouncement() to return false and updated content porcelain accordingly so it could still throw specific errors regarding faulty user arguments.
Change summary:
Changed content.react() to throw InvalidEmojiStringError when passed an invalid emoji string
Changed content.tombstone() to throw InvalidTombstoneAnnouncementTypeError or InvalidTombstoneAnnouncementSignatureError depending on which aspect of the provided target is invalid instead of simply throwing InvalidTombstoneAnnouncementTypeError for both
Exported announcement.isValidEmoji() for testing emoji strings
Exported announcement.isValidSignature() for testing signature strings
Added announcement.isTombstoneableType() for testing if a given announcement type can be tombstoned
Updated content.react() to throw InvalidAnnouncementUriError as specified in its documentation
Added appropriate tests and documentation for above
Problem
Previously,
announcements.isTombstoneAnnouncement()
threw errors like the activity content validations which is inconsistent with the behavior of the other announcement validations. #179304918Solution
Updated
announcements.isTombstoneAnnouncement()
to return false and updated content porcelain accordingly so it could still throw specific errors regarding faulty user arguments.Change summary: