[FIX] Mentions (#1829)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
parent
ab0736233d
commit
a7d7ff4bb9
|
@ -14,8 +14,10 @@ const changeMessageStatus = async(id, tmid, status, message) => {
|
||||||
successBatch.push(
|
successBatch.push(
|
||||||
messageRecord.prepareUpdate((m) => {
|
messageRecord.prepareUpdate((m) => {
|
||||||
m.status = status;
|
m.status = status;
|
||||||
m.mentions = message.mentions;
|
if (message) {
|
||||||
m.channels = message.channels;
|
m.mentions = message.mentions;
|
||||||
|
m.channels = message.channels;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -24,8 +26,10 @@ const changeMessageStatus = async(id, tmid, status, message) => {
|
||||||
successBatch.push(
|
successBatch.push(
|
||||||
threadMessageRecord.prepareUpdate((tm) => {
|
threadMessageRecord.prepareUpdate((tm) => {
|
||||||
tm.status = status;
|
tm.status = status;
|
||||||
tm.mentions = message.mentions;
|
if (message) {
|
||||||
tm.channels = message.channels;
|
tm.mentions = message.mentions;
|
||||||
|
tm.channels = message.channels;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -51,10 +55,13 @@ export async function sendMessageCall(message) {
|
||||||
_id, rid, msg, tmid
|
_id, rid, msg, tmid
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
await changeMessageStatus(_id, tmid, messagesStatus.SENT, result.message);
|
if (result.success) {
|
||||||
} catch (e) {
|
return changeMessageStatus(_id, tmid, messagesStatus.SENT, result.message);
|
||||||
await changeMessageStatus(_id, tmid, messagesStatus.ERROR);
|
}
|
||||||
|
} catch {
|
||||||
|
// do nothing
|
||||||
}
|
}
|
||||||
|
return changeMessageStatus(_id, tmid, messagesStatus.ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function(rid, msg, tmid, user) {
|
export default async function(rid, msg, tmid, user) {
|
||||||
|
|
|
@ -3331,7 +3331,7 @@ commondir@^1.0.1:
|
||||||
|
|
||||||
"commonmark@git+https://github.com/RocketChat/commonmark.js.git":
|
"commonmark@git+https://github.com/RocketChat/commonmark.js.git":
|
||||||
version "0.29.0"
|
version "0.29.0"
|
||||||
resolved "git+https://github.com/RocketChat/commonmark.js.git#fe037b1c97ca5bc7d329ef312bf9a374ab8f3d4a"
|
resolved "git+https://github.com/RocketChat/commonmark.js.git#5d293fe9ba83a3e6f842d5d3f41a9b57c35bea1f"
|
||||||
dependencies:
|
dependencies:
|
||||||
entities "~ 1.1.1"
|
entities "~ 1.1.1"
|
||||||
mdurl "~ 1.0.1"
|
mdurl "~ 1.0.1"
|
||||||
|
|
Loading…
Reference in New Issue