@elizaos/plugin-bootstrap 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -185,6 +185,10 @@ var choiceAction = {
|
|
|
185
185
|
tags: ["AWAITING_CHOICE"]
|
|
186
186
|
});
|
|
187
187
|
const room = state.data.room ?? await runtime.getRoom(message.roomId);
|
|
188
|
+
if (!room || !room.serverId) {
|
|
189
|
+
logger.error("Room or room.serverId is missing");
|
|
190
|
+
throw new Error("Room or room.serverId is required for validating the action");
|
|
191
|
+
}
|
|
188
192
|
const userRole = await getUserServerRole(runtime, message.entityId, room.serverId);
|
|
189
193
|
if (userRole !== "OWNER" && userRole !== "ADMIN") {
|
|
190
194
|
return false;
|