Commit 84e0a0f7f0

84e0a0f7f0caa295b616409c21db73a873b3a6ef

parent: 3c0f3f1e92

Unsigned

Denis Kasak <dkasak@termina.org.uk> · 2020-08-02 12:43 UTC

Add TODO to also return tags alongside strings when rendering.

Layout: unified · split

src/render.rs +8 −1
@@ -19,7 +19,11 @@ use matrix_sdk::{
1919};
2020use weechat::Weechat;
2121
22/// Rendering function for membership events (joins, leaves, bans, profile changes, etc).
22/// Rendering function for membership events (joins, leaves, bans, profile
23/// changes, etc).
24// TODO: We should not return raw strings here but something like [Block]
25// where Block is (String, [Tags]). Each Block represents one or several lines
26// which have the same tags.
2327pub fn render_membership(
2428 member: &SyncStateEvent<MemberEventContent>,
2529 sender: &WeechatRoomMember,
@@ -181,6 +185,9 @@ pub fn render_membership(
181185
182186/// Rendering function for room messages.
183187// FIXME: Pass room member
188// TODO: We should not return raw strings here but something like [Block]
189// where Block is (String, [Tags]). Each Block represents one or several lines
190// which have the same tags.
184191pub fn render_message(
185192 message: &AnyPossiblyRedactedSyncMessageEvent,
186193 displayname: String,