Create mapping after successful reaction handling
This commit is contained in:
parent
418c79ff55
commit
ed4c9689ec
@ -254,7 +254,6 @@ export async function handle(rcMessage: RcMessage): Promise<void> {
|
|||||||
ts,
|
ts,
|
||||||
rcMessage._id
|
rcMessage._id
|
||||||
)
|
)
|
||||||
await createMapping(rcMessage._id, event_id)
|
|
||||||
if (rcMessage.reactions) {
|
if (rcMessage.reactions) {
|
||||||
log.info(
|
log.info(
|
||||||
`Parsing reactions for message ${rcMessage._id}`,
|
`Parsing reactions for message ${rcMessage._id}`,
|
||||||
@ -262,6 +261,7 @@ export async function handle(rcMessage: RcMessage): Promise<void> {
|
|||||||
)
|
)
|
||||||
await handleReactions(rcMessage, event_id, room_id)
|
await handleReactions(rcMessage, event_id, room_id)
|
||||||
}
|
}
|
||||||
|
await createMapping(rcMessage._id, event_id)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (
|
if (
|
||||||
error instanceof AxiosError &&
|
error instanceof AxiosError &&
|
||||||
@ -310,7 +310,6 @@ export async function handle(rcMessage: RcMessage): Promise<void> {
|
|||||||
ts,
|
ts,
|
||||||
rcMessage._id
|
rcMessage._id
|
||||||
)
|
)
|
||||||
await createMapping(rcMessage._id, event_id)
|
|
||||||
if (rcMessage.reactions) {
|
if (rcMessage.reactions) {
|
||||||
log.info(
|
log.info(
|
||||||
`Parsing reactions for message ${rcMessage._id}`,
|
`Parsing reactions for message ${rcMessage._id}`,
|
||||||
@ -318,6 +317,7 @@ export async function handle(rcMessage: RcMessage): Promise<void> {
|
|||||||
)
|
)
|
||||||
await handleReactions(rcMessage, event_id, room_id)
|
await handleReactions(rcMessage, event_id, room_id)
|
||||||
}
|
}
|
||||||
|
await createMapping(rcMessage._id, event_id)
|
||||||
} else {
|
} else {
|
||||||
throw error
|
throw error
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user