Use createMessage() where possible in MultiUserChat

This commit is contained in:
Florian Schmaus 2014-12-30 12:13:12 +01:00
parent cba681a967
commit e6593cb200
1 changed files with 2 additions and 2 deletions

View File

@ -1551,7 +1551,7 @@ public class MultiUserChat {
* @throws NotConnectedException
*/
public void sendMessage(String text) throws XMPPException, NotConnectedException {
Message message = new Message(room, Message.Type.groupchat);
Message message = createMessage();
message.setBody(text);
connection.sendPacket(message);
}
@ -1682,7 +1682,7 @@ public class MultiUserChat {
* @throws NotConnectedException
*/
public void changeSubject(final String subject) throws NoResponseException, XMPPErrorException, NotConnectedException {
Message message = new Message(room, Message.Type.groupchat);
Message message = createMessage();
message.setSubject(subject);
// Wait for an error or confirmation message back from the server.
PacketFilter responseFilter = new AndFilter(fromRoomGroupchatFilter, new PacketFilter() {