hotfix: ::status und ::hilfe zeigen wieder Plugin-Version an

- version.py: __version__ auf 10.0.2, __commit__ auf e7668f9 gesetzt,
  get_version_string() Helper hinzugefügt
- adapter.py: _cmd_status übergibt plugin_version an build_status_text
- adapter.py: _cmd_hilfe übergibt plugin_version an build_help_text
- adapter.py: drei build_help_text-Aufrufe in _handle_inline_command
  (unbekannter ::-Befehl, Command-Question-Fallback, natürliche Hilfe)
  übergeben jetzt ebenfalls plugin_version

Kein Push.
This commit is contained in:
Bernd (Hermes)
2026-08-05 18:17:35 +02:00
parent e7668f9a97
commit ac5c36f85d
2 changed files with 20 additions and 3 deletions
+8
View File
@@ -3713,6 +3713,7 @@ class RocketChatAdapter(BasePlatformAdapter):
is_natural_help_request, is_natural_help_request,
build_help_text, build_help_text,
) )
from archivar.version import get_version_string
stripped = text.strip() stripped = text.strip()
@@ -3731,6 +3732,7 @@ class RocketChatAdapter(BasePlatformAdapter):
help_text = build_help_text( help_text = build_help_text(
self._inline_commands, self._inline_commands,
room_map_summary=self._room_map_summary, room_map_summary=self._room_map_summary,
plugin_version=get_version_string(),
) )
unknown_msg = ( unknown_msg = (
f"Unbekannter Befehl `::{command}`. " f"Unbekannter Befehl `::{command}`. "
@@ -3752,6 +3754,7 @@ class RocketChatAdapter(BasePlatformAdapter):
help_text = build_help_text( help_text = build_help_text(
self._inline_commands, self._inline_commands,
room_map_summary=self._room_map_summary, room_map_summary=self._room_map_summary,
plugin_version=get_version_string(),
) )
unknown_msg = ( unknown_msg = (
f"Unbekannter Befehl `::{cmd_question}`. " f"Unbekannter Befehl `::{cmd_question}`. "
@@ -3765,6 +3768,7 @@ class RocketChatAdapter(BasePlatformAdapter):
help_text = build_help_text( help_text = build_help_text(
self._inline_commands, self._inline_commands,
room_map_summary=self._room_map_summary, room_map_summary=self._room_map_summary,
plugin_version=get_version_string(),
) )
await self._post_message_with_retry(room_id, help_text) await self._post_message_with_retry(room_id, help_text)
return True return True
@@ -3844,6 +3848,7 @@ class RocketChatAdapter(BasePlatformAdapter):
async def _cmd_hilfe(self, room_id: str, args: str) -> str: async def _cmd_hilfe(self, room_id: str, args: str) -> str:
"""::hilfe — Zeigt die Hilfeseite mit allen Befehlen.""" """::hilfe — Zeigt die Hilfeseite mit allen Befehlen."""
from archivar.inline_commands import build_help_text from archivar.inline_commands import build_help_text
from archivar.version import get_version_string
# V9: PresenceEngine-Werte lesen (mit _has_presence-Guard) # V9: PresenceEngine-Werte lesen (mit _has_presence-Guard)
presence_enabled = None presence_enabled = None
@@ -3858,11 +3863,13 @@ class RocketChatAdapter(BasePlatformAdapter):
room_map_summary=self._room_map_summary, room_map_summary=self._room_map_summary,
presence_enabled=presence_enabled, presence_enabled=presence_enabled,
current_status=current_status, current_status=current_status,
plugin_version=get_version_string(),
) )
async def _cmd_status(self, room_id: str, args: str) -> str: async def _cmd_status(self, room_id: str, args: str) -> str:
"""::status — Zeigt den aktuellen Plugin-Status.""" """::status — Zeigt den aktuellen Plugin-Status."""
from archivar.inline_commands import build_status_text from archivar.inline_commands import build_status_text
from archivar.version import get_version_string
room_count = 0 room_count = 0
archivar_active = False archivar_active = False
@@ -3896,6 +3903,7 @@ class RocketChatAdapter(BasePlatformAdapter):
presence_enabled=presence_enabled, presence_enabled=presence_enabled,
current_status=current_status, current_status=current_status,
pulse_active=pulse_active, pulse_active=pulse_active,
plugin_version=get_version_string(),
) )
async def _cmd_reset(self, room_id: str, args: str) -> str: async def _cmd_reset(self, room_id: str, args: str) -> str:
+12 -3
View File
@@ -1,10 +1,19 @@
""" """
V9.2: Plugin-Version — zentrale Versionsnummer für ::status und ::hilfe. V10.0.2: Plugin-Version — zentrale Versionsnummer für ::status und ::hilfe.
Wird von install.sh beim Deployment aktualisiert: Wird von install.sh beim Deployment aktualisiert:
COMMIT=$(git rev-parse --short HEAD) COMMIT=$(git rev-parse --short HEAD)
sed -i "s/__commit__ = .*/__commit__ = \"$COMMIT\"/" version.py sed -i "s/__commit__ = .*/__commit__ = \"$COMMIT\"/" version.py
""" """
__version__ = "9.2" __version__ = "10.0.2"
__commit__ = "auto" # wird von install.sh auf aktuellen Git-Hash gesetzt __commit__ = "e7668f9" # wird von install.sh auf aktuellen Git-Hash gesetzt
def get_version_string() -> str:
"""Liefert den formatierten Versions-String für ::status und ::hilfe.
Returns:
z.B. 'V10.0.2 (e7668f9)'
"""
return f"V{__version__} ({__commit__})"