mirror of
https://github.com/element-hq/synapse.git
synced 2025-03-14 09:45:51 +00:00
Appease the linter
This commit is contained in:
parent
42c518225b
commit
4dbca25a40
2 changed files with 4 additions and 2 deletions
|
@ -3106,7 +3106,7 @@ class PersistEventsStore:
|
|||
txn,
|
||||
event,
|
||||
"content.topic",
|
||||
get_plain_text_topic_from_event_content(event.content),
|
||||
get_plain_text_topic_from_event_content(event.content) or "",
|
||||
)
|
||||
|
||||
def _store_room_name_txn(self, txn: LoggingTransaction, event: EventBase) -> None:
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
#
|
||||
#
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from synapse.types import JsonDict
|
||||
from synapse.util.stringutils import random_string
|
||||
|
||||
|
@ -30,7 +32,7 @@ def generate_fake_event_id() -> str:
|
|||
return "$" + random_string(43)
|
||||
|
||||
|
||||
def get_plain_text_topic_from_event_content(content: JsonDict):
|
||||
def get_plain_text_topic_from_event_content(content: JsonDict) -> Optional[str]:
|
||||
"""
|
||||
Given the content of an m.room.topic event returns the plain text topic
|
||||
representation if any exists.
|
||||
|
|
Loading…
Add table
Reference in a new issue