Add messagesPackageReceived

@param \Sopinet\ChatBundle\Entity\MessagePackage $messagesPackageReceived
@return Device
350067
public function addMessagesPackageReceived(\Sopinet\ChatBundle\Entity\MessagePackage $messagesPackageReceived)
    {
        $this->messagesPackageReceived[] = $messagesPackageReceived;

        return $this;
    }
780100
protected function createMessage(QueueSendMessageTransfer $messageTransfer)
    {
        $message = new AMQPMessage($messageTransfer->getBody(), $this->config->getMessageConfig());
        $headers = $messageTransfer->getHeaders();

        if ($headers !== null) {
            $headersTable = new AMQPTable($headers);
            $message->set('application_headers', $headersTable);
        }

        return $message;
    }
689831
public function setMessages($locale, $messages)
    {
        $this->loadMessagesFromFile($locale);
        $this->addResource('array', $messages, $locale);
        $this->messages[$locale] = array_merge(
            isset($this->messages[$locale]) ? $this->messages[$locale] : [],
            $messages
        );

        return $this;
    }
678043
public function send($mobile, $message, $messageId = null) {
    // Create message
    $message = $this->createMessage([
      'id'      => $messageId,
      'mobile'  => $mobile,
      'message' => $message,
    ]);
    // Return sender response
    return Loader::sender($this->config)->send($message);
  }
22664
public function addMessage($messages, $type = Bootstrap::MSG_INFO)
    {
        if (!$this->mute) {
            $this->app->addMessage($messages, $type);
        }

        return $this;
    }
1365548
private function createNotification(\ArrayIterator $recipients, MessageInterface $message)
    {
        $message = clone $message;
        $message->setRecipientDeviceCollection($recipients);

        $handlers = $this->getPayloadHandlers();

        foreach ($handlers as $handler) {
            if ($handler->isSupported($message)) {
                $notificationId = uniqid();
                $handler
                    ->setNotificationId($notificationId)
                    ->setMessage($message);

                $packedPayload  = $this->handlePayload($handler);
                $customData     = $handler->getCustomNotificationData();

                $notification = new Notification();
                $notification
                    ->setIdentifier($notificationId)
                    ->setType($message->getMessageType())
                    ->setRecipients($recipients)
                    ->setPayload($packedPayload)
                    ->setCustomNotificationData($customData)
                ;
                return $notification;
            }
        }

        throw new DomainException(
            sprintf(
                'Unhandled message type %s',
                $message->getMessageType()
            )
        );
    }
1294706
public static function createMessageDeliveryEvent(array $payload)
    {
        $delivery = Delivery::create($payload['delivery']);
        $senderId = $payload['sender']['id'];
        $recipientId = $payload['recipient']['id'];

        return new MessageDeliveryEvent($senderId, $recipientId, $delivery);
    }
602551
@SuppressWarnings("unchecked")
    public <E> MessageHandler<? super E> addSentMessageHandler(Class<E> type,
            MessageHandler<? super E> handler) {
        sentMessageHandlerCache.clear();
        return (MessageHandler<? super E>) sentMessageHandlers.put(type, handler);
    }
828148
public function add($key, $message)
    {
        if ($this->isUnique($key, $message)) {
            $this->messages[$key][] = $message;
        }

        return $this;
    }
1362875
public function setSystemMessageType($messageType): Envelope
    {
        if (!in_array($messageType, static::getLetterTypeOptions())) {
            throw new InvalidArgumentException(
                sprintf('Property %s is not supported for %s', $messageType, __FUNCTION__)
            );
        }

        $this->data['letterType']['systemMessageType'] = $messageType;

        return $this;
    }
675109
public Descriptor withMessageSerializer(Type messageType, MessageSerializer<?, ?> messageSerializer) {
        return replaceAllMessageSerializers(messageSerializers.plus(messageType, messageSerializer));
    }
604349
public function merge($messages)
    {
        if ($messages instanceof MessageProvider) {
            $messages = $messages->getMessageBag()->getMessages();
        }

        $this->messages = array_merge_recursive($this->messages, $messages);

        return $this;
    }
719545
public function addPackElement(PackElement $packElements)
    {
        $this->packElements[] = $packElements;
        $packElements->setProductPack($this);

        return $this;
    }
1268995
public function pushMessage($to, MessageBuilder $messageBuilder)
    {
        return $this->httpClient->post($this->endpointBase . '/v2/bot/message/push', [
            'to' => $to,
            'messages' => $messageBuilder->buildMessage(),
        ]);
    }
13386
public static Message buildDelivered(Zxid deliveredZxid) {
    ZabMessage.Zxid zxid = toProtoZxid(deliveredZxid);
    ZabMessage.Delivered delivered =
      ZabMessage.Delivered.newBuilder().setZxid(zxid).build();
    return Message.newBuilder().setType(MessageType.DELIVERED)
                               .setDelivered(delivered).build();
  }
428699
public function buildNotifications(MessageInterface $message)
    {
        $notifications  = new \ArrayIterator();
        $recipientQueue = new \SplQueue();
        $recipientChunk = new \ArrayIterator();

        foreach ($message->getRecipientDeviceCollection() as $recipient) {
            $recipientChunk->append($recipient);

            if ($recipientChunk->count() >= $message->getMaxRecipientsPerMessage()) {
                $recipientQueue->enqueue($recipientChunk);
                $recipientChunk = new \ArrayIterator();
            }
        }

        if ($recipientChunk->count()) {
            $recipientQueue->enqueue($recipientChunk);
        }

        while (!$recipientQueue->isEmpty()) {
            $notification = $this->createNotification($recipientQueue->dequeue(), $message);
            $notifications->append($notification);
        }

        return $notifications;
    }
841126
public function AddPackage(Nether\Project\Package $pkg) {
		$this->Packages[$pkg->GetName()] = $pkg;
		$pkg->SetRealBooter($this);
		return $this;
	}