یک پیام را به روز می کند. بین روش های 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-13 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-13 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eUpdates a Google Chat message using the \u003ccode\u003ePUT\u003c/code\u003e method, preferably with the \u003ccode\u003epatch\u003c/code\u003e approach for partial modifications.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing the message's resource name in the URL path for identification.\u003c/p\u003e\n"],["\u003cp\u003eAllows specifying fields to update using \u003ccode\u003eupdateMask\u003c/code\u003e and supports creating a new message if the original is missing with \u003ccode\u003eallowMissing\u003c/code\u003e set to \u003ccode\u003etrue\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAuthentication can be done using app authentication or user authentication, with app authentication restricting updates to messages created by the calling Chat app.\u003c/p\u003e\n"],["\u003cp\u003eNeeds authorization with specific OAuth scopes like \u003ccode\u003echat.bot\u003c/code\u003e, \u003ccode\u003echat.import\u003c/code\u003e, or \u003ccode\u003echat.messages\u003c/code\u003e.\u003c/p\u003e\n"]]],["This describes updating messages in Google Chat using either `patch` or `put` requests, recommending `patch`. The `PUT` request uses the format `https://chat.googleapis.com/v1/{message.name=spaces/*/messages/*}`. Updating requires specifying the `message.name` path parameter and the `updateMask` query parameter to identify fields to modify. Optional `allowMissing` creates a new message if one is not found. The request and response body are `Message` instances. Authorization requires specific OAuth scopes. App authentication can update messages from the calling app only.\n"],null,[]]