- **Parent Item**: Object with `lastClaimId` field containing the handleId of the target action (e.g., GiveAction)
- [x] The issuer is the "agent" attaching the emojis.
- Why not multiple emojis (eg. to optimize bandwidth & storage when using many)?
Because there's a possibility of removing an emoji, and then the communication and logic (on both client & server) for determining which is off and which is on becomes more complicated. It's also not a very typical action: people usually attach one at a time. It's possible, so it's an optimization worth considering someday.
- [ ] Ensure there is no "agent". (The issuer is the "agent" attaching the emojis; it doesn't make sense to attach an emoji on behalf of someone else.)
- [ ] Store in `emoji_claim` table
- [ ] Update `give_claim``emojiCount`
- [ ] Return standard claim response with `claimId` and `handleId`
- [ ] Return standard claim response with `claimId` and `handleId`
- [ ] Add to emoji count of the parent if `give_claim`, `offer_claim`, or `plan_claim`
- [ ] Add to emoji count of the parent if `give_claim`
- [ ] Allow for a removal of a previous emoji: if they sent it before, it gets erased (like in Slack)
- [ ] Allow for a removal of a previous emoji: if they sent it before, it gets toggled (like in Slack) and entry in `emoji_claim` for this `issuerDid` + `parentHandleId` + `text` is erased
**Retrieval Endpoints:**
**New Retrieval Endpoints:**
- [ ] `GET /api/v2/report/comments?parentItemId=<handleId>` - Get all emojis for an item
- [ ] `GET /api/v2/report/emoji?parentHandleId=<handleId>` gets all active `emoji_claim` records for an item, paged
- Consider storing all emojis in a record for quick retrieval for any particular entity.
### 4. GiveAction Enhancement
**Modify existing endpoints:**
**Modify existing endpoints:**
- [ ] Add `emojiCount` field to `GiveSummaryRecord` interface
- [ ] Update `dbService.getGives*` methods to include emoji counts
- [ ] Update `dbService.getGives*` methods to include emoji counts
- [ ] Update types and API documentation
**API Documentation**
- [ ] Update Swagger documentation for new endpoints
- [ ] Document Emoji claim structure
- [ ] Provide examples of emoji submission and retrieval
**Authentication & Authorization**
- Emojis require valid JWT authentication (like other claims)
- Any authenticated user can add emojis to any public GiveAction
- Users can retrieve all emoji taggers on a particular GiveAction, though DIDs are subject to visibility constraints
### 5. Client-Side
**Add to UI**
- [ ] Add the button for adding emojis, and a click sends it
- See https://www.npmjs.com/package/emoji-mart-vue-fast
- [ ] UI should show new emoji quickly
- [ ] Show the previous emojis with their count, with data from GiveSummaryRecord
- [ ] Clicking on an emoji already sent from this person removes it