mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 18:59:41 +02:00
More forgiving with values from incoming packets.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1967 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
0e1a1a0feb
commit
5673eca059
4 changed files with 22 additions and 1 deletions
|
@ -269,6 +269,10 @@ public class Message extends Packet {
|
|||
* @return the Type corresponding to the String.
|
||||
*/
|
||||
public static Type fromString(String type) {
|
||||
if (type == null) {
|
||||
return NORMAL;
|
||||
}
|
||||
type = type.toLowerCase();
|
||||
if (CHAT.toString().equals(type)) {
|
||||
return CHAT;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue