(
threads: SerializedThread[],
{
active,
threadId,
messageId,
type,
currentUser,
}: {
active: boolean;
threadId: string;
messageId: string;
type: string;
currentUser: SerializedUser | null;
}
)
| 136 | } |
| 137 | |
| 138 | export function addReaction( |
| 139 | threads: SerializedThread[], |
| 140 | { |
| 141 | active, |
| 142 | threadId, |
| 143 | messageId, |
| 144 | type, |
| 145 | currentUser, |
| 146 | }: { |
| 147 | active: boolean; |
| 148 | threadId: string; |
| 149 | messageId: string; |
| 150 | type: string; |
| 151 | currentUser: SerializedUser | null; |
| 152 | } |
| 153 | ) { |
| 154 | if (!currentUser) { |
| 155 | return threads; |
| 156 | } |
| 157 | return threads.map((thread) => |
| 158 | addReactionToThread(thread, { |
| 159 | threadId, |
| 160 | messageId, |
| 161 | type, |
| 162 | active, |
| 163 | currentUser, |
| 164 | }) |
| 165 | ); |
| 166 | } |
no test coverage detected