+8
-8
src/moderation.ts
+8
-8
src/moderation.ts
···
13
13
await isLoggedIn;
14
14
await limit(async () => {
15
15
try {
16
-
return agent.tools.ozone.moderation.emitEvent(
16
+
return await agent.tools.ozone.moderation.emitEvent(
17
17
{
18
18
event: {
19
19
$type: 'tools.ozone.moderation.defs#modEventLabel',
···
28
28
cid,
29
29
},
30
30
// put in the rest of the metadata
31
-
createdBy: `${agent.did}`,
31
+
createdBy: agent.did ?? '',
32
32
createdAt: new Date().toISOString(),
33
33
},
34
34
{
···
69
69
did,
70
70
},
71
71
// put in the rest of the metadata
72
-
createdBy: `${agent.did}`,
72
+
createdBy: agent.did ?? '',
73
73
createdAt: new Date().toISOString(),
74
74
},
75
75
{
···
96
96
await isLoggedIn;
97
97
await limit(async () => {
98
98
try {
99
-
return agent.tools.ozone.moderation.emitEvent(
99
+
return await agent.tools.ozone.moderation.emitEvent(
100
100
{
101
101
event: {
102
102
$type: 'tools.ozone.moderation.defs#modEventReport',
···
110
110
cid,
111
111
},
112
112
// put in the rest of the metadata
113
-
createdBy: `${agent.did}`,
113
+
createdBy: agent.did ?? '',
114
114
createdAt: new Date().toISOString(),
115
115
},
116
116
{
···
145
145
did,
146
146
},
147
147
// put in the rest of the metadata
148
-
createdBy: `${agent.did}`,
148
+
createdBy: agent.did ?? '',
149
149
createdAt: new Date().toISOString(),
150
150
},
151
151
{
···
181
181
did,
182
182
},
183
183
// put in the rest of the metadata
184
-
createdBy: `${agent.did}`,
184
+
createdBy: agent.did ?? '',
185
185
createdAt: new Date().toISOString(),
186
186
},
187
187
{
···
232
232
});
233
233
};
234
234
235
-
export async function checkAccountLabels(did: string) {
235
+
export function checkAccountLabels(_did: string) {
236
236
/* try {
237
237
const repo = await limit(() =>
238
238
agent.tools.ozone.moderation.getRepo(