feat: enhance Mattermost proxy with improved post ID deduplication and file tracking

This commit is contained in:
2026-05-19 16:03:16 -06:00
parent 9dd731f758
commit b886c61afd
4 changed files with 30 additions and 35 deletions

View File

@@ -11,21 +11,8 @@ if [ -f "$SCRIPT_DIR/.env" ]; then
fi
APP_PATH="${MATTERMOST_APP_PATH:-/Applications/Mattermost.app}"
APP_NAME="${MATTERMOST_APP_NAME:-Mattermost}"
APP_BIN="${MATTERMOST_APP_BIN:-$APP_PATH/Contents/MacOS/Mattermost}"
PROXY_HOST="${MATTERMOST_MIRROR_LISTEN_HOST:-127.0.0.1}"
PROXY_PORT="${MATTERMOST_MIRROR_LISTEN_PORT:-8080}"
LAUNCH_MODE="${MATTERMOST_MIRROR_LAUNCH_MODE:-open}"
if [ "$LAUNCH_MODE" = "binary" ]; then
if [ ! -x "$APP_BIN" ]; then
echo "Mattermost app binary not found or not executable: $APP_BIN" >&2
echo "Set MATTERMOST_APP_BIN in scripts/mattermost-proxy/.env if needed." >&2
exit 1
fi
exec "$APP_BIN" --proxy-server="http://${PROXY_HOST}:${PROXY_PORT}"
fi
if [ ! -d "$APP_PATH" ]; then
echo "Mattermost app bundle not found: $APP_PATH" >&2