{
"id": "chat.yakka.toggleReaction",
"defs": {
"main": {
"type": "procedure",
"input": {
"schema": {
"ref": "#input",
"type": "ref"
},
"encoding": "application/json"
},
"errors": [
{
"name": "MessageNotFound"
},
{
"name": "ChannelForbidden"
}
],
"output": {
"schema": {
"ref": "#output",
"type": "ref"
},
"encoding": "application/json"
},
"description": "Add or remove the viewer's reaction to a message. A reaction is a record in the viewer's own repo, so this creates or deletes one — there is no shared counter to increment, and the count a client renders is the appview's tally of records it has ingested."
},
"input": {
"type": "object",
"required": [
"uri",
"emoji"
],
"properties": {
"uri": {
"type": "string",
"format": "at-uri"
},
"emoji": {
"type": "string",
"maxGraphemes": 8
}
}
},
"output": {
"type": "object",
"required": [
"mine"
],
"properties": {
"mine": {
"type": "boolean",
"description": "Whether the viewer now reacts with this emoji — the state after the toggle, so a client need not guess which way it went."
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}