2023-12-17 15:54:35 +02:00
|
|
|
// mautrix-signal - A Matrix-Signal puppeting bridge.
|
2024-08-07 02:14:39 +03:00
|
|
|
// Copyright (C) 2024 Tulir Asokan
|
2023-03-29 04:55:54 -04:00
|
|
|
//
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
// GNU Affero General Public License for more details.
|
|
|
|
|
//
|
|
|
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
|
|
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
2024-08-07 02:14:39 +03:00
|
|
|
package signalid
|
2023-03-29 04:55:54 -04:00
|
|
|
|
2024-08-21 13:20:05 +03:00
|
|
|
import (
|
|
|
|
|
"go.mau.fi/util/jsontime"
|
|
|
|
|
)
|
|
|
|
|
|
2024-08-07 02:14:39 +03:00
|
|
|
type PortalMetadata struct {
|
2024-09-03 20:22:42 +03:00
|
|
|
Revision uint32 `json:"revision,omitempty"`
|
|
|
|
|
ExpirationTimerVersion uint32 `json:"expiration_timer_version,omitempty"`
|
2025-09-25 12:31:18 -07:00
|
|
|
// Lazy resync tracking
|
|
|
|
|
LastSync jsontime.Unix `json:"last_sync,omitempty"`
|
2024-08-07 02:14:39 +03:00
|
|
|
}
|
2023-03-29 04:55:54 -04:00
|
|
|
|
2024-08-07 02:14:39 +03:00
|
|
|
type MessageMetadata struct {
|
2025-10-29 14:36:15 +02:00
|
|
|
ContainsAttachments bool `json:"contains_attachments,omitempty"`
|
|
|
|
|
MatrixPollOptionIDs []string `json:"matrix_poll_option_ids,omitempty"`
|
2023-03-29 04:55:54 -04:00
|
|
|
}
|
2024-08-21 13:20:05 +03:00
|
|
|
|
2025-01-19 13:26:23 +02:00
|
|
|
type UserLoginMetadata struct {
|
2026-01-07 15:23:42 +02:00
|
|
|
ChatsSynced bool `json:"chats_synced,omitempty"`
|
|
|
|
|
LastContactSync jsontime.UnixMilli `json:"last_contact_sync,omitempty"`
|
2025-01-19 13:26:23 +02:00
|
|
|
}
|
|
|
|
|
|
2024-08-21 13:20:05 +03:00
|
|
|
type GhostMetadata struct {
|
|
|
|
|
ProfileFetchedAt jsontime.UnixMilli `json:"profile_fetched_at"`
|
|
|
|
|
}
|