private string getRoomId() { string roomId; if (Properties.Settings.Default.roomID.Length == 0) { roomId = JitsiUrl.generateRandomId(); } else { roomId = Properties.Settings.Default.roomID; } return(roomId); }
public void setRoomId(string newRoomId) { string newDomain = JitsiUrl.getDomain(); string oldBody = appointmentItem.Body; // Filter room id for legal characters string newRoomIdLegal = JitsiUrl.filterLegalCharacters(newRoomId); string newBody; try { // Replace old domain for new domain newBody = oldBody.Replace(findRoomId(), newRoomIdLegal); newBody = newBody.Replace(oldDomain, newDomain); } catch { // If replacement failed, append new message text if (string.IsNullOrWhiteSpace(oldBody)) { newBody = NewJitsiAppointment.generateBody(newRoomIdLegal); } else { newBody = oldBody + "\n" + NewJitsiAppointment.generateBody(newRoomIdLegal); } this.buttonStartWithAudioMuted.Checked = false; this.buttonStartWithVideoMuted.Checked = false; this.buttonRequireDisplayName.Checked = false; } fieldRoomID.Text = newRoomIdLegal; appointmentItem.Body = newBody; oldDomain = newDomain; }
public void randomiseRoomId() { setRoomId(JitsiUrl.generateRandomId()); }
public static string generateBody(string roomId) { return(Globals.ThisAddIn.getElementTranslation("appointmentItem", "textBodyMessage") + (JitsiUrl.getUrlBase() + roomId)); }