1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-26 14:02:06 +01:00

Allow MUC room subject changes from the MUCs bare JID

Fixes SMACK-754.
This commit is contained in:
Florian Schmaus 2017-04-04 14:08:19 +02:00
parent e6787b21ce
commit a887cde1ce
2 changed files with 1 additions and 5 deletions

View file

@ -170,10 +170,6 @@ public class MultiUserChat {
public void processStanza(Stanza packet) { public void processStanza(Stanza packet) {
Message msg = (Message) packet; Message msg = (Message) packet;
EntityFullJid from = msg.getFrom().asEntityFullJidIfPossible(); EntityFullJid from = msg.getFrom().asEntityFullJidIfPossible();
if (from == null) {
LOGGER.warning("Message subject not changed by a full JID: " + msg.getFrom());
return;
}
// Update the room subject // Update the room subject
subject = msg.getSubject(); subject = msg.getSubject();
// Fire event for subject updated listeners // Fire event for subject updated listeners

View file

@ -30,7 +30,7 @@ public interface SubjectUpdatedListener {
* Called when a MUC room has changed its subject. * Called when a MUC room has changed its subject.
* *
* @param subject the new room's subject. * @param subject the new room's subject.
* @param from the user that changed the room's subject (e.g. room@conference.jabber.org/nick). * @param from the user that changed the room's subject or <code>null</code> if the room itself changed the subject.
*/ */
public abstract void subjectUpdated(String subject, EntityFullJid from); public abstract void subjectUpdated(String subject, EntityFullJid from);