Don't try to send m.bridge events before portal is created

This commit is contained in:
Tulir Asokan
2020-06-15 16:13:49 +03:00
parent 489e520ddd
commit 59d76148dc
2 changed files with 3 additions and 1 deletions
-1
View File
@@ -14,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
from typing import Optional
from itertools import chain
from alchemysession import AlchemySessionContainer
+3
View File
@@ -287,6 +287,9 @@ class PortalMetadata(BasePortal, ABC):
return info
async def update_bridge_info(self) -> None:
if not self.mxid:
self.log.debug("Not updating bridge info: no Matrix room created")
return
try:
self.log.debug("Updating bridge info...")
await self.main_intent.send_state_event(self.mxid, StateBridge,