mirror of
https://github.com/MathMan05/Fermi.git
synced 2026-10-23 02:11:21 +00:00
check perm
This commit is contained in:
1 parent
67e5561295
commit
5935ccedd3
1 file changed
+9
-3
@@ -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";
|
||||
|
||||
Reference in new issue
Block a user