mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-12-16 18:11:08 +01:00
Merge remote-tracking branch 'my/master'
This commit is contained in:
commit
b558a128c3
30 changed files with 203 additions and 136 deletions
|
|
@ -615,6 +615,7 @@ public final class AdHocCommandManager extends Manager {
|
|||
* @return the command instance to execute.
|
||||
* @throws XMPPErrorException if there is problem creating the new instance.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private LocalCommand newInstanceOfCmd(String commandNode, String sessionID) throws XMPPErrorException
|
||||
{
|
||||
AdHocCommandInfo commandInfo = commands.get(commandNode);
|
||||
|
|
|
|||
|
|
@ -95,8 +95,14 @@ public class AdHocCommandDataProvider extends IQProvider<AdHocCommandData> {
|
|||
adHocCommandData.setForm(dataFormProvider.parse(parser));
|
||||
}
|
||||
else if (parser.getName().equals("note")) {
|
||||
AdHocCommandNote.Type type = AdHocCommandNote.Type.valueOf(
|
||||
parser.getAttributeValue("", "type"));
|
||||
String typeString = parser.getAttributeValue("", "type");
|
||||
AdHocCommandNote.Type type;
|
||||
if (typeString != null) {
|
||||
type = AdHocCommandNote.Type.valueOf(typeString);
|
||||
} else {
|
||||
// Type is optional and 'info' if not present.
|
||||
type = AdHocCommandNote.Type.info;
|
||||
}
|
||||
String value = parser.nextText();
|
||||
adHocCommandData.addNote(new AdHocCommandNote(type, value));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue