mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-10-29 03:34:43 +00:00
SparkMeetPlugin: Use getBareJid().getLocalpart()
This commit is contained in:
parent
fdd6ac67ca
commit
f212d884d0
@ -42,7 +42,7 @@ public class ChatRoomDecorator
|
||||
ImageIcon ofmeetIcon = new ImageIcon(imageByte);
|
||||
ofmeetButton = new RolloverButton(SparkRes.getImageIcon("PADE_ICON"));
|
||||
ofmeetButton.setToolTipText(GraphicUtils.createToolTip(SparkMeetResource.getString("name")));
|
||||
final String roomId = getNode(room.getBareJid().toString());
|
||||
final String roomId = room.getBareJid().getLocalpart().toString();
|
||||
final String sessionID = String.valueOf(System.currentTimeMillis());
|
||||
|
||||
ofmeetButton.addActionListener(event -> {
|
||||
@ -52,7 +52,6 @@ public class ChatRoomDecorator
|
||||
{
|
||||
newUrl = plugin.url + newRoomId;
|
||||
plugin.handleClick(newUrl, room, newUrl, Message.Type.groupchat);
|
||||
|
||||
} else {
|
||||
newUrl = plugin.url + newRoomId;
|
||||
plugin.handleClick(newUrl, room, newUrl, Message.Type.chat);
|
||||
@ -61,10 +60,8 @@ public class ChatRoomDecorator
|
||||
room.getEditorBar().add(ofmeetButton);
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
Log.error("cannot create pade meetings icon", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void finished()
|
||||
@ -72,14 +69,4 @@ public class ChatRoomDecorator
|
||||
Log.warning("ChatRoomDecorator: finished " + room.getBareJid());
|
||||
}
|
||||
|
||||
private String getNode(String jid)
|
||||
{
|
||||
String node = jid;
|
||||
int pos = node.indexOf("@");
|
||||
|
||||
if (pos > -1)
|
||||
node = jid.substring(0, pos);
|
||||
|
||||
return node;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user