یک پیام را به روز می کند. بین روش های patch و update تفاوت وجود دارد. متد patch از یک درخواست patch استفاده می کند در حالی که روش update از یک درخواست put استفاده می کند. توصیه می کنیم از روش patch استفاده کنید. برای مثال، بهروزرسانی یک پیام را ببینید.
جایی که {space} شناسه فضایی است که پیام در آن پست شده است و {message} یک شناسه اختصاص داده شده توسط سیستم برای پیام است. برای مثال، spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB .
اگر هنگام ایجاد پیام، یک شناسه سفارشی تنظیم کنید، میتوانید با جایگزین کردن {message} با مقدار فیلد clientAssignedMessageId ، از این شناسه برای تعیین پیام در یک درخواست استفاده کنید. به عنوان مثال، spaces/AAAAAAAAAAA/messages/client-custom-name . برای جزئیات، به نام پیام مراجعه کنید.
اختیاری. اگر true و پیام پیدا نشد، یک پیام جدید ایجاد می شود و updateMask نادیده گرفته می شود. شناسه پیام مشخص شده باید به مشتری اختصاص داده شود در غیر این صورت درخواست انجام نمی شود.
تاریخ آخرین بهروزرسانی 2025-02-27 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-02-27 بهوقت ساعت هماهنگ جهانی."],[[["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"]]