تعديل رسالة هناك فرق بين طريقتَي patch وupdate. يستخدم الإجراء patch طلب patch، بينما يستخدم الإجراء update طلب put. ننصحك باستخدام الطريقة patch. للاطّلاع على مثال، يُرجى الانتقال إلى تعديل رسالة.
حيث {space} هو رقم تعريف المساحة التي تتم مشاركة الرسالة فيها، و{message} هو رقم تعريف الرسالة الذي يحدّده النظام. على سبيل المثال، spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB.
إذا ضبطت معرّفًا مخصّصًا عند إنشاء رسالة، يمكنك استخدام هذا المعرّف لتحديد الرسالة في طلب من خلال استبدال {message} بالقيمة من الحقل clientAssignedMessageId. على سبيل المثال، spaces/AAAAAAAAAAA/messages/client-custom-name. لمزيد من التفاصيل، يُرجى الاطّلاع على تسمية رسالة.
quotedMessageMetadata (يسمح فقط بإزالة الرسالة المُقتبَسة)
allowMissing
boolean
اختياريّ. إذا لم يتم العثور على الرسالة التي تحمل true، يتم إنشاء رسالة جديدة ويتم تجاهل updateMask. يجب أن يكون معرّف الرسالة المحدّد معرّفًا من إنشاء العميل، وإلا سيتعذّر تنفيذ الطلب.
تاريخ التعديل الأخير: 2025-08-20 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-08-20 (حسب التوقيت العالمي المتفَّق عليه)"],[[["Updates a Google Chat message using the `PATCH` method, preferably over the `update` method which uses `PUT`."],["Supports both app and user authentication, with app authentication limited to updating messages created by the calling Chat app."],["Requires specifying the message to update using its resource name in the URL path and the fields to update using the `updateMask` query parameter."],["Allows creation of a new message if the original is not found when `allowMissing` query parameter is set to `true` and a client-assigned message ID is provided."],["Requires authorization with one of the specified OAuth scopes (`chat.bot`, `chat.import`, or `chat.messages`)."]]],["This documentation outlines how to update a message using the `PATCH` method via an HTTP request to `https://chat.googleapis.com/v1/{message.name=spaces/*/messages/*}`. The `message.name` path parameter is required, specifying the message's resource name. The `updateMask` query parameter is mandatory, indicating which fields to update (e.g., text, attachments). Optionally, `allowMissing` creates a new message if one isn't found. The request and response bodies utilize the `Message` resource, and app or user authentication are supported, with specific authentication impacting permissions.\n"]]