fhg
This commit is contained in:
@@ -520,7 +520,7 @@
|
||||
"limit_reached": "Upload limit reached (0/{limit})",
|
||||
"limit_remaining": "{remaining}/{limit} uploads remaining",
|
||||
"auth_required_title": "Authentication Required",
|
||||
"auth_required_text": "You must be logged in to upload content to w0bm.",
|
||||
"auth_required_text": "You must be logged in to upload content.",
|
||||
"login_btn": "Login"
|
||||
},
|
||||
"messages": {
|
||||
|
||||
@@ -514,7 +514,7 @@
|
||||
"limit_reached": "Uploadlimiet bereikt (0/{limit})",
|
||||
"limit_remaining": "{remaining}/{limit} uploads over",
|
||||
"auth_required_title": "Authenticatie Vereist",
|
||||
"auth_required_text": "Je moet ingelogd zijn om inhoud naar w0bm te uploaden.",
|
||||
"auth_required_text": "Je moet ingelogd zijn om inhoud naar f0ckm te uploaden.",
|
||||
"login_btn": "Inloggen"
|
||||
},
|
||||
"messages": {
|
||||
|
||||
@@ -515,7 +515,7 @@
|
||||
"limit_reached": "Aufladierungsgrenze erreicht (0/{limit})",
|
||||
"limit_remaining": "{remaining}/{limit} Aufladierungen verbleibend",
|
||||
"auth_required_title": "Authentifizierung erforderlich",
|
||||
"auth_required_text": "Sie müssen angemeldet sein, um Inhalte auf w0bm hochzuladen.",
|
||||
"auth_required_text": "Sie müssen angemeldet sein, um Inhalte hochzuladen.",
|
||||
"login_btn": "Anmeldung"
|
||||
},
|
||||
"messages": {
|
||||
|
||||
@@ -431,7 +431,7 @@ export default (router, tpl) => {
|
||||
session: (req.session && req.session.user) ? { ...req.session } : false,
|
||||
page_meta: {
|
||||
title: 'about',
|
||||
description: 'About w0bm.com',
|
||||
description: 'About',
|
||||
url: `https://${cfg.main.url.domain}/about`
|
||||
}
|
||||
}, req)
|
||||
|
||||
@@ -42,7 +42,7 @@ export default (router, tpl) => {
|
||||
web_url_upload: !!cfg.websrv.web_url_upload,
|
||||
page_meta: {
|
||||
title: 'upload',
|
||||
description: 'Upload content to w0bm',
|
||||
description: 'Upload content',
|
||||
url: `https://${cfg.main.url.domain}/upload`
|
||||
}
|
||||
}, req)
|
||||
|
||||
@@ -299,9 +299,9 @@ export default (router, tpl) => {
|
||||
router.post(/^\/api\/v2\/me\/halls\/?$/, async (req, res) => {
|
||||
if (cfg.websrv.userhalls_enabled === false) return res.writeHead(404, { 'Content-Type': 'application/json' }).end(JSON.stringify({ success: false }));
|
||||
if (!requireLogin(req, res)) return;
|
||||
const name = (req.post.name || '').trim();
|
||||
const slug = slugify(req.post.slug || name);
|
||||
const description = (req.post.description || '').trim() || null;
|
||||
const name = ((req.post?.name ?? req.body?.name) || '').trim();
|
||||
const slug = slugify((req.post?.slug ?? req.body?.slug) || name);
|
||||
const description = ((req.post?.description ?? req.body?.description) || '').trim() || null;
|
||||
|
||||
if (!name || !slug) {
|
||||
return res.writeHead(400, { 'Content-Type': 'application/json' })
|
||||
@@ -319,7 +319,7 @@ export default (router, tpl) => {
|
||||
if (cfg.websrv.userhalls_enabled === false) return res.writeHead(404, { 'Content-Type': 'application/json' }).end(JSON.stringify({ success: false }));
|
||||
if (!requireLogin(req, res)) return;
|
||||
const slug = decodeURIComponent(req.params.slug);
|
||||
const { name, slug: newSlugRaw, description, is_private } = req.post;
|
||||
const { name, slug: newSlugRaw, description, is_private } = (req.post || req.body || {});
|
||||
const newSlug = newSlugRaw ? slugify(newSlugRaw) : undefined;
|
||||
|
||||
const result = await f0cklib.updateUserHall(req.session.id, slug, {
|
||||
@@ -361,7 +361,7 @@ export default (router, tpl) => {
|
||||
router.post(/^\/api\/v2\/me\/halls\/(?<slug>[^/]+)\/items\/?$/, async (req, res) => {
|
||||
if (!requireLogin(req, res)) return;
|
||||
const slug = decodeURIComponent(req.params.slug);
|
||||
const itemId = +req.post.item_id;
|
||||
const itemId = +(req.post?.item_id ?? req.body?.item_id);
|
||||
|
||||
if (!itemId) {
|
||||
return res.writeHead(400, { 'Content-Type': 'application/json' })
|
||||
|
||||
@@ -328,7 +328,7 @@ export default async bot => {
|
||||
}
|
||||
|
||||
if (e.type === 'tg' && // proto: tg
|
||||
!isWCommand && // !w / !w0bm
|
||||
!isWCommand && // !w
|
||||
!e.raw?.forward_date && // is forwarded?
|
||||
!mediagroupids.has(mediaGroupId) // prepared mediagroup?
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user