OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)

This commit is contained in:
wangruiguo
2026-09-03 18:49:20 +08:00
commit d647428529
3501 changed files with 1988906 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
leantime.reactionsController = (function () {
//Functions
let addReactions = function (module, moduleId, reaction, clb) {
leantime.rpc('Reactions.Reactions.react', {
module: module,
moduleId: moduleId,
reaction: reaction
}).then(function (success) {
// The service returns false when the reaction was not applied
// (e.g. the user already reacted) — only update the UI on success.
if (success) {
clb();
}
}).catch(function (e) { console.error('Could not add reaction', e); });
};
let removeReaction = function (module, moduleId, reaction, clb) {
leantime.rpc('Reactions.Reactions.unreact', {
module: module,
moduleId: moduleId,
reaction: reaction
}).then(function (success) {
// Only update the UI when the reaction was actually removed.
if (success) {
clb();
}
}).catch(function (e) { console.error('Could not remove reaction', e); });
};
// Make public what you want to have public, everything else is private
return {
addReactions:addReactions,
removeReaction:removeReaction
};
})();