MCPcopy
hub / github.com/QLHazyCoder/FlowPilot / setLuckmailPreserveTagInfo

Function setLuckmailPreserveTagInfo

background.js:1063–1076  ·  view source on GitHub ↗
(tag)

Source from the content-addressed store, hash-verified

1061}
1062
1063async function setLuckmailPreserveTagInfo(tag) {
1064 const normalizedTags = normalizeLuckmailTags([tag]);
1065 const normalizedTag = normalizedTags[0] || {
1066 id: 0,
1067 name: DEFAULT_LUCKMAIL_PRESERVE_TAG_NAME,
1068 };
1069 const updates = {
1070 luckmailPreserveTagId: Number(normalizedTag.id) || 0,
1071 luckmailPreserveTagName: String(normalizedTag.name || '').trim() || DEFAULT_LUCKMAIL_PRESERVE_TAG_NAME,
1072 };
1073 await setState(updates);
1074 broadcastDataUpdate(updates);
1075 return updates;
1076}
1077
1078async function setLuckmailPurchaseState(purchase) {
1079 const normalizedPurchase = purchase ? normalizeLuckmailPurchase(purchase) : null;

Callers 1

Calls 3

normalizeLuckmailTagsFunction · 0.85
setStateFunction · 0.85
broadcastDataUpdateFunction · 0.85

Tested by

no test coverage detected