-
-
Notifications
You must be signed in to change notification settings - Fork 77
Closed
Description
In server_notice.go#L39 with only MsgType & Body defined, format & formatted_body are discarded, so format in server notice is unsupported.
dendrite/clientapi/routing/server_notices.go
Lines 37 to 45 in e546df2
| type sendServerNoticeRequest struct { | |
| UserID string `json:"user_id,omitempty"` | |
| Content struct { | |
| MsgType string `json:"msgtype,omitempty"` | |
| Body string `json:"body,omitempty"` | |
| } `json:"content,omitempty"` | |
| Type string `json:"type,omitempty"` | |
| StateKey string `json:"state_key,omitempty"` | |
| } |
In synapse, this is handled by
async def send_notice(
self,
user_id: str,
event_content: dict,
type: str = EventTypes.Message,
state_key: Optional[str] = None,
txn_id: Optional[str] = None,
)By replacing dendrite's content definition to Content map[string]interface{} json:"content,omitempty"`` would also support format in server notices. Check dedfaf@3c528cb. Or we could just add format & `formatted_body` field..
Note that matrix spec have msgtype & body defined only, so this is not part of matrix spec for now.
I could made a PR if the change is ok, but im not sure whether this should or not be an implement.
YooLc
Metadata
Metadata
Assignees
Labels
No labels