feat(MSC3440): implement threads for feed and notifications.

fix(sendHtmlNotice): possibly MSC1767 related.
This commit is contained in:
vulet 2022-04-26 03:09:55 +00:00
parent 3122361c6c
commit 5924009154
8 changed files with 56 additions and 10 deletions

View file

@ -5,7 +5,7 @@ const sendError = async (event, roomId, e) => {
: e.data ? error = `Error(${e.errcode}): ${e.data.error}`
: error = `Error: ${e.syscall}, ${e.code}`;
return matrixClient.sendHtmlNotice(roomId,
'', error);
' ', error);
};
const addReact = async (event, key) => {
@ -124,6 +124,7 @@ module.exports.handleReact = async (event) => {
if (reaction.key === '👏') command = 'clap';
if (reaction.key === '🗑️️') command = 'redact';
if (reaction.key === '🌧️') command = 'makeitrain';
if (reaction.key === '') command = 'unroll';
eventHandler(args, roomId, command, event);
};
@ -150,6 +151,7 @@ module.exports.selfReact = async (event) => {
const type = meta.split(' ')[0];
if (type === 'redact' || type === 'unreblog') addReact(event, '🗑️️');
if (type === 'status' || type === 'reblog' || type === 'mention') {
addReact(event, '');
addReact(event, '🔁');
addReact(event, '👏');
if (config.fediverse.tipping === true) addReact(event, '🌧️');