connector/tomatrix: fix nil handling again

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
Sumner Evans
2024-12-04 13:23:05 -07:00
parent 68f4b0e21f
commit 46a4b68073
+3 -2
View File
@@ -34,9 +34,10 @@ type ttlable interface {
}
func mediaHashID(ctx context.Context, m tg.MessageMediaClass) []byte {
switch media := m.(type) {
case nil:
if m == nil {
return nil
}
switch media := m.(type) {
case *tg.MessageMediaPhoto:
return binary.BigEndian.AppendUint64(nil, uint64(media.Photo.GetID()))
case *tg.MessageMediaDocument: