We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67e5561 commit 5935cceCopy full SHA for 5935cce
1 file changed
src/webpage/index.ts
@@ -424,9 +424,15 @@ if (window.location.pathname.startsWith("/channels")) {
424
e.stopImmediatePropagation();
425
};
426
const umenu = new Contextmenu<void, void>("upload");
427
- umenu.addButton(I18n.makePoll(), () => {
428
- thisUser.makePoll();
429
- });
+ umenu.addButton(
+ I18n.makePoll(),
+ () => {
430
+ thisUser.makePoll();
431
+ },
432
+ {
433
+ visible: () => !!thisUser.channelfocus?.hasPermission("SEND_POLLS"),
434
435
+ );
436
umenu.addButton(I18n.upload(), () => {
437
const input = document.createElement("input");
438
input.type = "file";
0 commit comments