Skip to content

Commit 4dbca25

Browse files
committed
Appease the linter
1 parent 42c5182 commit 4dbca25

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

synapse/storage/databases/main/events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3106,7 +3106,7 @@ def _store_room_topic_txn(self, txn: LoggingTransaction, event: EventBase) -> No
31063106
txn,
31073107
event,
31083108
"content.topic",
3109-
get_plain_text_topic_from_event_content(event.content),
3109+
get_plain_text_topic_from_event_content(event.content) or "",
31103110
)
31113111

31123112
def _store_room_name_txn(self, txn: LoggingTransaction, event: EventBase) -> None:

synapse/util/events.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#
1414
#
1515

16+
from typing import Optional
17+
1618
from synapse.types import JsonDict
1719
from synapse.util.stringutils import random_string
1820

@@ -30,7 +32,7 @@ def generate_fake_event_id() -> str:
3032
return "$" + random_string(43)
3133

3234

33-
def get_plain_text_topic_from_event_content(content: JsonDict):
35+
def get_plain_text_topic_from_event_content(content: JsonDict) -> Optional[str]:
3436
"""
3537
Given the content of an m.room.topic event returns the plain text topic
3638
representation if any exists.

0 commit comments

Comments
 (0)