prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Add rich equality comparison to `WriteAccessAllowed`
  The comparison should be based on the `web_app_name` attribute only.
  
  See https://github.com/python-telegram-bot/python-telegram-bot/pull/3898#discussion_r1337582872
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `telegram/_writeaccessallowed.py`
  Content:
  ```
  1 #!/usr/bin/env python
  2 #
  3 # A library that provides a Python interface to the Telegram Bot API
  4 # Copyright (C) 2015-2023
  5 # Leandro Toledo de Souza <devs@python-telegram-bot.org>
  6 #
  7 # This program is free software: you can redistribute it and/or modify
  8 # it under the terms of the GNU Lesser Public License as published by
  9 # the Free Software Foundation, either version 3 of the License, or
  10 # (at your option) any later version.
  11 #
  12 # This program is distributed in the hope that it will be useful,
  13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15 # GNU Lesser Public License for more details.
  16 #
  17 # You should have received a copy of the GNU Lesser Public License
  18 # along with this program.  If not, see [http://www.gnu.org/licenses/].
  19 """This module contains objects related to the write access allowed service message."""
  20 from typing import Optional
  21 
  22 from telegram._telegramobject import TelegramObject
  23 from telegram._utils.types import JSONDict
  24 
  25 
  26 class WriteAccessAllowed(TelegramObject):
  27     """
  28     This object represents a service message about a user allowing a bot to write messages after
  29     adding the bot to the attachment menu or launching a Web App from a link.
  30 
  31     .. versionadded:: 20.0
  32 
  33     Args:
  34         web_app_name (:obj:`str`, optional): Name of the Web App which was launched from a link.
  35 
  36             .. versionadded:: 20.3
  37 
  38     Attributes:
  39         web_app_name (:obj:`str`): Optional. Name of the Web App which was launched from a link.
  40 
  41             .. versionadded:: 20.3
  42 
  43     """
  44 
  45     __slots__ = ("web_app_name",)
  46 
  47     def __init__(
  48         self, web_app_name: Optional[str] = None, *, api_kwargs: Optional[JSONDict] = None
  49     ):
  50         super().__init__(api_kwargs=api_kwargs)
  51         self.web_app_name: Optional[str] = web_app_name
  52 
  53         self._freeze()
  54
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/telegram/_writeaccessallowed.py b/telegram/_writeaccessallowed.py
  --- a/telegram/_writeaccessallowed.py
  +++ b/telegram/_writeaccessallowed.py
  @@ -28,7 +28,12 @@
       This object represents a service message about a user allowing a bot to write messages after
       adding the bot to the attachment menu or launching a Web App from a link.
   
  +    Objects of this class are comparable in terms of equality. Two objects of this class are
  +    considered equal, if their :attr:`web_app_name` is equal.
  +
       .. versionadded:: 20.0
  +    .. versionchanged:: NEXT.VERSION
  +       Added custom equality comparison for objects of this class.
   
       Args:
           web_app_name (:obj:`str`, optional): Name of the Web App which was launched from a link.
  @@ -50,4 +55,6 @@
           super().__init__(api_kwargs=api_kwargs)
           self.web_app_name: Optional[str] = web_app_name
   
  +        self._id_attrs = (self.web_app_name,)
  +
           self._freeze()
  
verification_info: {"golden_diff": "diff --git a/telegram/_writeaccessallowed.py b/telegram/_writeaccessallowed.py\n--- a/telegram/_writeaccessallowed.py\n+++ b/telegram/_writeaccessallowed.py\n@@ -28,7 +28,12 @@\n     This object represents a service message about a user allowing a bot to write messages after\n     adding the bot to the attachment menu or launching a Web App from a link.\n \n+    Objects of this class are comparable in terms of equality. Two objects of this class are\n+    considered equal, if their :attr:`web_app_name` is equal.\n+\n     .. versionadded:: 20.0\n+    .. versionchanged:: NEXT.VERSION\n+       Added custom equality comparison for objects of this class.\n \n     Args:\n         web_app_name (:obj:`str`, optional): Name of the Web App which was launched from a link.\n@@ -50,4 +55,6 @@\n         super().__init__(api_kwargs=api_kwargs)\n         self.web_app_name: Optional[str] = web_app_name\n \n+        self._id_attrs = (self.web_app_name,)\n+\n         self._freeze()\n", "issue": "Add rich equality comparison to `WriteAccessAllowed`\nThe comparison should be based on the `web_app_name` attribute only.\r\n\r\nSee https://github.com/python-telegram-bot/python-telegram-bot/pull/3898#discussion_r1337582872\n", "before_files": [{"content": "#!/usr/bin/env python\n#\n# A library that provides a Python interface to the Telegram Bot API\n# Copyright (C) 2015-2023\n# Leandro Toledo de Souza <devs@python-telegram-bot.org>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU Lesser Public License for more details.\n#\n# You should have received a copy of the GNU Lesser Public License\n# along with this program.  If not, see [http://www.gnu.org/licenses/].\n\"\"\"This module contains objects related to the write access allowed service message.\"\"\"\nfrom typing import Optional\n\nfrom telegram._telegramobject import TelegramObject\nfrom telegram._utils.types import JSONDict\n\n\nclass WriteAccessAllowed(TelegramObject):\n    \"\"\"\n    This object represents a service message about a user allowing a bot to write messages after\n    adding the bot to the attachment menu or launching a Web App from a link.\n\n    .. versionadded:: 20.0\n\n    Args:\n        web_app_name (:obj:`str`, optional): Name of the Web App which was launched from a link.\n\n            .. versionadded:: 20.3\n\n    Attributes:\n        web_app_name (:obj:`str`): Optional. Name of the Web App which was launched from a link.\n\n            .. versionadded:: 20.3\n\n    \"\"\"\n\n    __slots__ = (\"web_app_name\",)\n\n    def __init__(\n        self, web_app_name: Optional[str] = None, *, api_kwargs: Optional[JSONDict] = None\n    ):\n        super().__init__(api_kwargs=api_kwargs)\n        self.web_app_name: Optional[str] = web_app_name\n\n        self._freeze()\n", "path": "telegram/_writeaccessallowed.py"}], "after_files": [{"content": "#!/usr/bin/env python\n#\n# A library that provides a Python interface to the Telegram Bot API\n# Copyright (C) 2015-2023\n# Leandro Toledo de Souza <devs@python-telegram-bot.org>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU Lesser Public License for more details.\n#\n# You should have received a copy of the GNU Lesser Public License\n# along with this program.  If not, see [http://www.gnu.org/licenses/].\n\"\"\"This module contains objects related to the write access allowed service message.\"\"\"\nfrom typing import Optional\n\nfrom telegram._telegramobject import TelegramObject\nfrom telegram._utils.types import JSONDict\n\n\nclass WriteAccessAllowed(TelegramObject):\n    \"\"\"\n    This object represents a service message about a user allowing a bot to write messages after\n    adding the bot to the attachment menu or launching a Web App from a link.\n\n    Objects of this class are comparable in terms of equality. Two objects of this class are\n    considered equal, if their :attr:`web_app_name` is equal.\n\n    .. versionadded:: 20.0\n    .. versionchanged:: NEXT.VERSION\n       Added custom equality comparison for objects of this class.\n\n    Args:\n        web_app_name (:obj:`str`, optional): Name of the Web App which was launched from a link.\n\n            .. versionadded:: 20.3\n\n    Attributes:\n        web_app_name (:obj:`str`): Optional. Name of the Web App which was launched from a link.\n\n            .. versionadded:: 20.3\n\n    \"\"\"\n\n    __slots__ = (\"web_app_name\",)\n\n    def __init__(\n        self, web_app_name: Optional[str] = None, *, api_kwargs: Optional[JSONDict] = None\n    ):\n        super().__init__(api_kwargs=api_kwargs)\n        self.web_app_name: Optional[str] = web_app_name\n\n        self._id_attrs = (self.web_app_name,)\n\n        self._freeze()\n", "path": "telegram/_writeaccessallowed.py"}]}