|
@@ -302,6 +302,15 @@ class AddLink(Endpoint):
|
|
def html(self):
|
|
def html(self):
|
|
if not self.user:
|
|
if not self.user:
|
|
raise e.LCRedirect("/login")
|
|
raise e.LCRedirect("/login")
|
|
|
|
+
|
|
|
|
+ url = flask.request.args.get("text", None)
|
|
|
|
+ name = flask.request.args.get("name", None)
|
|
|
|
+ text = flask.request.args.get("text", None)
|
|
|
|
+
|
|
|
|
+ # Android sets the text field to the url only
|
|
|
|
+ if url is None and name is None and text is not None:
|
|
|
|
+ args = f"url={text}"
|
|
else:
|
|
else:
|
|
args = "&".join(f"{key}={value}" for key, value in flask.request.args.items())
|
|
args = "&".join(f"{key}={value}" for key, value in flask.request.args.items())
|
|
- raise e.LCRedirect(f"/u/{self.user.name}/l?{args}")
|
|
|
|
|
|
+
|
|
|
|
+ raise e.LCRedirect(f"/u/{self.user.name}/l?{args}")
|