dms: implement basic text message handling

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
Sumner Evans
2024-06-06 12:26:56 -06:00
parent 6c88b21b75
commit a4aedec044
5 changed files with 287 additions and 44 deletions
+6 -6
View File
@@ -78,12 +78,12 @@ func (mc *MessageConverter) ToMatrix(ctx context.Context, msg tg.MessageClass) *
fmt.Printf("photo: %v\n", photo)
largest := getLargestPhotoSize(photo.GetSizes())
file := tg.InputPhotoFileLocation{
ID: photo.GetID(),
AccessHash: photo.GetAccessHash(),
FileReference: photo.GetFileReference(),
ThumbSize: largest.GetType(),
}
// file := tg.InputPhotoFileLocation{
// ID: photo.GetID(),
// AccessHash: photo.GetAccessHash(),
// FileReference: photo.GetFileReference(),
// ThumbSize: largest.GetType(),
// }
mxc := id.ContentURIString(
fmt.Sprintf("mxc://telegram.sumner.user.beeper.com/p.i%d.a%d.f%s.t%s", photo.GetID(), photo.GetAccessHash(), base64.RawURLEncoding.EncodeToString(photo.GetFileReference()), largest.GetType()),