(tag)
| 1061 | } |
| 1062 | |
| 1063 | async 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 | |
| 1078 | async function setLuckmailPurchaseState(purchase) { |
| 1079 | const normalizedPurchase = purchase ? normalizeLuckmailPurchase(purchase) : null; |
no test coverage detected