Open MichalNemec opened 7 months ago
I need to see messages before accepting the conversation to prevent spam.
This is not possible. As you can see in the spec here the matrix protocol doesn't allow taking a look into the timeline. However it is possible to set the reason
field when sending an invite. Be aware that this would be not end to end encrypted
I used element app: 1) created a room 2) made the room public 3) "You made future room history visible to anyone." 4) "You changed the room name to PUBLIC" 5) "You changed the topic to "?" 6) "You invited [testing user from matrix-dart-sdk]" 7) sent "hello" message 8) click in flutter app on invite 9) see empty screen, no messages.
The only thing i see is a status message (joined the chat) from event.calcLocalizedBodyFallback(i18n, withSenderNamePrefix: true),
I don't use reason
, but something similar:
var creationContent = <String, Object?>{};
creationContent['request_info'] = requestInfo;
var roomId = await _client.createRoom(
invite: [matrixUserId],
isDirect: true,
preset: CreateRoomPreset.trustedPrivateChat,
initialState: initialState,
powerLevelContentOverride: null,
creationContent: creationContent,
);
Then you can retrieve it in RoomCreate
event
Checklist
In which Project did the bug appear?
Other
If you selected \"Other\" as Project, please enter in which project the bug occurred.
SDK
On which platform did the bug appear?
Android, iOS
SDK Version
29d982b
Describe the problem caused by this bug
im using this for private conversation:
When creator sends a message in that room, then invitee sees username and no message, upon clicking on that conversation, i get error:
Tried to request history without a prev_batch token
I need to see messages before accepting the conversation to prevent spam.
upon accepting conversation, i see messages.
Steps To Reproduce
Screenshots or Logs
No response
Security related
No response