mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 12:34:54 -04:00
Add type hints for HTTP and email pushers. (#8880)
This commit is contained in:
parent
02e588856a
commit
92d87c6882
8 changed files with 168 additions and 101 deletions
|
@ -12,6 +12,9 @@
|
|||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
from typing import Dict
|
||||
|
||||
from synapse.events import EventBase
|
||||
from synapse.push.presentable_names import calculate_room_name, name_from_member_event
|
||||
from synapse.storage import Storage
|
||||
from synapse.storage.databases.main import DataStore
|
||||
|
@ -46,7 +49,9 @@ async def get_badge_count(store: DataStore, user_id: str, group_by_room: bool) -
|
|||
return badge
|
||||
|
||||
|
||||
async def get_context_for_event(storage: Storage, state_handler, ev, user_id):
|
||||
async def get_context_for_event(
|
||||
storage: Storage, ev: EventBase, user_id: str
|
||||
) -> Dict[str, str]:
|
||||
ctx = {}
|
||||
|
||||
room_state_ids = await storage.state.get_state_ids_for_event(ev.event_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue