mirror of
https://github.com/vector-im/element-call.git
synced 2026-07-12 18:39:19 +00:00
Add comments on reaction interface
This commit is contained in:
@@ -29,9 +29,26 @@ import rockSoundMp3 from "../sound/reactions/rock.mp3?url";
|
|||||||
export const ElementCallReactionEventType = "io.element.call.reaction";
|
export const ElementCallReactionEventType = "io.element.call.reaction";
|
||||||
|
|
||||||
export interface ReactionOption {
|
export interface ReactionOption {
|
||||||
|
/**
|
||||||
|
* The emoji to display. This is always displayed even if no emoji is matched
|
||||||
|
* from `ReactionSet`.
|
||||||
|
*
|
||||||
|
* @note Any excess characters are trimmed from this string.
|
||||||
|
*/
|
||||||
emoji: string;
|
emoji: string;
|
||||||
|
/**
|
||||||
|
* The name of the emoji. This is the unique key used when looking for a local
|
||||||
|
* effect in our `ReactionSet` array.
|
||||||
|
*/
|
||||||
name: string;
|
name: string;
|
||||||
|
/**
|
||||||
|
* Optional aliases to look for when searching for an emoji in the interface.
|
||||||
|
*/
|
||||||
alias?: string[];
|
alias?: string[];
|
||||||
|
/**
|
||||||
|
* Optional sound to play. An ogg sound must always be provided.
|
||||||
|
* If this sound isn't given, `GenericReaction` is used.
|
||||||
|
*/
|
||||||
sound?: {
|
sound?: {
|
||||||
mp3?: string;
|
mp3?: string;
|
||||||
ogg: string;
|
ogg: string;
|
||||||
@@ -61,6 +78,7 @@ export const ReactionSet: ReactionOption[] = [
|
|||||||
{
|
{
|
||||||
emoji: "👍",
|
emoji: "👍",
|
||||||
name: "thumbsup",
|
name: "thumbsup",
|
||||||
|
// TODO: These need to be translated.
|
||||||
alias: ["+1", "yes", "thumbs up"],
|
alias: ["+1", "yes", "thumbs up"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user