check perm

This commit is contained in:
MathMan05 committed 2026-05-21 16:19:10 -05:00
1 parent 67e5561295
commit 5935ccedd3
1 file changed
+9 -3
+9 -3
View File
@@ -424,9 +424,15 @@ if (window.location.pathname.startsWith("/channels")) {
e.stopImmediatePropagation();
};
const umenu = new Contextmenu<void, void>("upload");
umenu.addButton(I18n.makePoll(), () => {
thisUser.makePoll();
});
umenu.addButton(
I18n.makePoll(),
() => {
thisUser.makePoll();
},
{
visible: () => !!thisUser.channelfocus?.hasPermission("SEND_POLLS"),
},
);
umenu.addButton(I18n.upload(), () => {
const input = document.createElement("input");
input.type = "file";