mirror of
https://github.com/vector-im/element-call.git
synced 2026-07-27 19:29:19 +00:00
Redact the right thing.
This commit is contained in:
@@ -97,16 +97,20 @@ export const ReactionsProvider = ({
|
|||||||
|
|
||||||
const fetchReactions = (): void => {
|
const fetchReactions = (): void => {
|
||||||
for (const m of memberships) {
|
for (const m of memberships) {
|
||||||
if (!m.sender) {
|
if (!m.sender || !m.eventId) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const reaction = getLastReactionEvent(m.eventId);
|
||||||
|
const eventId = reaction?.getId();
|
||||||
|
if (!eventId) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const reaction = getLastReactionEvent(m.eventId!);
|
|
||||||
if (reaction && reaction.getType() === EventType.Reaction) {
|
if (reaction && reaction.getType() === EventType.Reaction) {
|
||||||
const content = reaction.getContent() as ReactionEventContent;
|
const content = reaction.getContent() as ReactionEventContent;
|
||||||
if (content?.["m.relates_to"].key === "🖐️") {
|
if (content?.["m.relates_to"]?.key === "🖐️") {
|
||||||
addRaisedHand(m.sender, new Date(m.createdTs()));
|
addRaisedHand(m.sender, new Date(m.createdTs()));
|
||||||
if (m.sender === room.client.getUserId()) {
|
if (m.sender === room.client.getUserId()) {
|
||||||
setMyReactionId(m.eventId!);
|
setMyReactionId(eventId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user