Update the subject of a conversation.

@param int    $conversationId
@param string $subject
329372
public function updateSubject(int $conversationId, string $subject): void
    {
        $patch = Patch::replace('subject', $subject);
        $this->patchConversation($conversationId, $patch);
    }
708031
public function update($chatid, $op_user, $name = null, $owner = null, $add_user_list = array(), $del_user_list = array())
    {
        $params = array(
            'chatid' => $chatid,
            'op_user' => $op_user,
            'name' => $name,
            'owner' => $owner,
            'add_user_list' => $add_user_list,
            'del_user_list' => $del_user_list
        );

        return $this->http->jsonPost(self::API_UPDATE, $params);
    }
592802
private function createAndPersistMessage(ConversationInterface $conversation, PersonInterface $sender, $body)
    {
        $message = $this->driver->createMessageModel($conversation, $sender, $body);

        $this->driver->persistMessage($message);

        return $message;
    }
1214818
public Conversation updateConversation(final String id, final ConversationStatus status)
            throws UnauthorizedException, GeneralException {
        if (id == null) {
            throw new IllegalArgumentException("Id must be specified.");
        }
        String url = String.format("%s%s/%s", CONVERSATIONS_BASE_URL, CONVERSATION_PATH, id);
        return messageBirdService.sendPayLoad("PATCH", url, status, Conversation.class);
    }
1180850
function(conversationId, userId, text, callback) {
      send(null, conversationId, utils.messageText('user_id', userId, text), callback);
    }
890873
public function updateStatus(ObservableInterface $subject, $event){
		$this->last = (string) $subject;
		$this->queries++;
	}
1110085
public static function unmute_conversations(int $userid, array $conversationids) {
        global $CFG, $USER;

        // Check if messaging is enabled.
        if (empty($CFG->messaging)) {
            throw new moodle_exception('disabled', 'message');
        }

        // Validate context.
        $context = context_system::instance();
        self::validate_context($context);

        $params = ['userid' => $userid, 'conversationids' => $conversationids];
        $params = self::validate_parameters(self::unmute_conversations_parameters(), $params);

        $capability = 'moodle/site:manageallmessaging';
        if (($USER->id != $params['userid']) && !has_capability($capability, $context)) {
            throw new required_capability_exception($context, $capability, 'nopermissions', '');
        }

        foreach ($params['conversationids'] as $conversationid) {
            \core_message\api::unmute_conversation($params['userid'], $conversationid);
        }

        return [];
    }
150308
public function update(SubjectInterface $subject)
   {
       if ($subject instanceof ModelInterface) {
           foreach (json_decode(json_encode($subject)) as $key => $value) {
               $this->appendValueTo($this->template, $key, $value);
           }
           return $subject;
       }
   }
476809
public function update(SplSubject $subject, $event = null)
    {
        switch ($event) {
            case 'log':
                /* @var Doozr_Logging $subject */
                $logs = $subject->getCollectionRaw();

                foreach ($logs as $log) {
                    $this->log(
                        $log['type'],
                        $log['message'],
                        unserialize($log['context']),
                        $log['time'],
                        $log['fingerprint'],
                        $log['separator']
                    );
                }
                break;
        }
    }
1007047
public Observable<ComapiResult<Void>> addParticipants(@NonNull final String conversationId, @NonNull final List<Participant> participants) {

        final String token = getToken();

        if (sessionController.isCreatingSession()) {
            return getTaskQueue().queueAddParticipants(conversationId, participants);
        } else if (TextUtils.isEmpty(token)) {
            return Observable.error(getSessionStateErrorDescription());
        } else {
            return doAddParticipants(token, conversationId, participants);
        }
    }
1329541
def batch_update_conversations(self, event, conversation_ids):
        
        path = {}
        data = {}
        params = {}

        # REQUIRED - conversation_ids
        """List of conversations to update. Limited to 500 conversations."""
        data["conversation_ids"] = conversation_ids

        # REQUIRED - event
        """The action to take on each conversation."""
        self._validate_enum(event, ["mark_as_read", "mark_as_unread", "star", "unstar", "archive", "destroy"])
        data["event"] = event

        self.logger.debug("PUT /api/v1/conversations with query params: {params} and form data: {data}".format(params=params, data=data, **path))
        return self.generic_request("PUT", "/api/v1/conversations".format(**path), data=data, params=params, single_item=True)
1200835
public Observable<ComapiResult<ConversationDetails>> getConversation(@NonNull final String conversationId) {

        final String token = getToken();

        if (sessionController.isCreatingSession()) {
            return getTaskQueue().queueGetConversation(conversationId);
        } else if (TextUtils.isEmpty(token)) {
            return Observable.error(getSessionStateErrorDescription());
        } else {
            return doGetConversation(token, conversationId);
        }
    }
15919
public function update(SubjectInterface $subject)
   {
       try {
           foreach ($this->observer as $value) {
               $value->update($subject);
           }
       } catch (Throwable $e) {
           throw new ViewException(
               "Can't update " . static::class . " " . $e->getMessage()
           );
       }
   }
991102
public function Bookmark($ConversationID, $UserID) {
      $Bookmark = FALSE;
      $Discussion = $this->GetID($ConversationID, $UserID);
      if (is_object($Discussion)) {
         $Bookmark = $Discussion->Bookmark == '0' ? '1' : '0';
         $this->SQL->Update('UserConversation')
            ->Set('Bookmark', $Bookmark)
            ->Where('ConversationID', $ConversationID)
            ->Where('UserID', $UserID)
            ->Put();
         $Bookmark == '1' ? TRUE : FALSE;
      }
      return $Bookmark;
   }
343739
protected function createMessageCallback(Recipient $user, $subject = null, $callback = null)
    {
        return function (Message $message) use ($user, $subject, $callback) {
            // Set the recipient detail.
            $message->to($user->getRecipientEmail(), $user->getRecipientName());

            // Only append the subject if it was provided.
            ! empty($subject) && $message->subject($subject);

            // Run any callback if provided.
            \is_callable($callback) && $callback(...func_get_args());
        };
    }
732448
public function GetID($ConversationID, $ViewingUserID = FALSE) {
      // Get the conversation.
      $Conversation = $this->GetWhere(array('ConversationID' => $ConversationID))->FirstRow(DATASET_TYPE_ARRAY);

      if ($ViewingUserID) {
         $Data = $this->SQL->GetWhere(
            'UserConversation',
            array('ConversationID' => $ConversationID, 'UserID' => $ViewingUserID))
            ->FirstRow(DATASET_TYPE_ARRAY);

         // Convert the array.
         $UserConversation = ArrayTranslate($Data, array('LastMessageID', 'CountReadMessages', 'DateLastViewed', 'Bookmarked'));
         $UserConversation['CountNewMessages'] = $Conversation['CountMessages'] - $Data['CountReadMessages'];
      } else {
         $UserConversation = array('CountNewMessages' => 0, 'CountReadMessages' => $Conversation['CountMessages'], 'DateLastViewed' => $Conversation['DateUpdated']);
      }
      $Conversation = array_merge($Conversation, $UserConversation);
      return (object)$Conversation;
   }
275933
public function updateCustomer(int $conversationId, int $newCustomerId): void
    {
        $patch = Patch::replace('primaryCustomer.id', $newCustomerId);
        $this->patchConversation($conversationId, $patch);
    }