Fix the reaction content type and the fixable lint sites. [skip build]
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
||||
RoomMember,
|
||||
} from 'matrix-js-sdk';
|
||||
import { CryptoBackend } from 'matrix-js-sdk/lib/common-crypto/CryptoBackend';
|
||||
import type { ReactionEventContent } from 'matrix-js-sdk/lib/@types/events';
|
||||
import { IconName, IconSrc } from '../components/icons';
|
||||
import { AccountDataEvent } from '../../types/matrix/accountData';
|
||||
import {
|
||||
@@ -486,11 +487,15 @@ export const decryptAllTimelineEvent = async (mx: MatrixClient, timeline: EventT
|
||||
await Promise.allSettled(decryptionPromises);
|
||||
};
|
||||
|
||||
export const getReactionContent = (eventId: string, key: string, shortcode?: string) => ({
|
||||
export const getReactionContent = (
|
||||
eventId: string,
|
||||
key: string,
|
||||
shortcode?: string,
|
||||
): ReactionEventContent & { shortcode?: string } => ({
|
||||
'm.relates_to': {
|
||||
event_id: eventId,
|
||||
key,
|
||||
rel_type: 'm.annotation',
|
||||
rel_type: RelationType.Annotation,
|
||||
},
|
||||
shortcode,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user