1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-29 07:22:07 +01:00

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

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() {