I’d like to adjust the URL created to include additional elements, for example, instead of cloud.domain.tld/s/3dhjfdkhhke it should be cloud.domain.tld/apps/memories/s/3dhjfdkhhke
This is the absolute basic script as example, you can make it more complex if you want.
Create this script, e.g. in /usr/local/bin/link2memories.sh:
#!/bin/bash
# Adapt this to your URL:
HOST="https://yourcloud.tld"
while (( "$#" )); do
case "$1" in
--help)
echo "/link2memories - A Nextcloud Talk chat wrapper to create"
echo "$HOST/apps/memories/s/<token> out of"
echo "$HOST/s/<token>"
echo
echo "Usage: /link2memories \$URL"
exit 0
;;
*)
break
;;
esac
done
echo "$1" | sed "s|$HOST/s/|$HOST/apps/memories/s/|1"
make it executable:
chmod +x /usr/local/bin/link2memories.sh
Now add the command to the Talk-Commands like described here: