Rebase DMs, updating for rename of 'scraper' to 'pkg/scraper'
This commit is contained in:
parent
f0fcef68e0
commit
ef72de76e0
@ -3,7 +3,7 @@ package persistence
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"offline_twitter/scraper"
|
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (p Profile) SaveChatRoom(r scraper.DMChatRoom) error {
|
func (p Profile) SaveChatRoom(r scraper.DMChatRoom) error {
|
||||||
|
@ -7,7 +7,8 @@ import (
|
|||||||
"github.com/go-test/deep"
|
"github.com/go-test/deep"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"offline_twitter/scraper"
|
|
||||||
|
"gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSaveAndLoadChatRoom(t *testing.T) {
|
func TestSaveAndLoadChatRoom(t *testing.T) {
|
||||||
|
@ -3,7 +3,7 @@ package persistence
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
. "offline_twitter/scraper"
|
. "gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Convenience function that saves all the objects in a TweetTrove.
|
// Convenience function that saves all the objects in a TweetTrove.
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
. "offline_twitter/scraper"
|
. "gitlab.com/offline-twitter/twitter_offline_engine/pkg/scraper"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestParseAPIDMMessage(t *testing.T) {
|
func TestParseAPIDMMessage(t *testing.T) {
|
||||||
|
@ -313,6 +313,50 @@ insert into likes values(4, 4, 1178839081222115328, 1426669666928414720);
|
|||||||
insert into likes values(5, 5, 1178839081222115328, 1698765208393576891);
|
insert into likes values(5, 5, 1178839081222115328, 1698765208393576891);
|
||||||
|
|
||||||
|
|
||||||
|
create table chat_rooms (rowid integer primary key,
|
||||||
|
id text unique not null,
|
||||||
|
type text not null,
|
||||||
|
last_messaged_at integer not null,
|
||||||
|
is_nsfw boolean not null
|
||||||
|
);
|
||||||
|
|
||||||
|
create table chat_room_participants(rowid integer primary key,
|
||||||
|
chat_room_id text not null,
|
||||||
|
user_id integer not null,
|
||||||
|
last_read_event_id integer not null,
|
||||||
|
is_chat_settings_valid boolean not null default 0,
|
||||||
|
is_notifications_disabled boolean not null,
|
||||||
|
is_mention_notifications_disabled boolean not null,
|
||||||
|
is_read_only boolean not null,
|
||||||
|
is_trusted boolean not null,
|
||||||
|
is_muted boolean not null,
|
||||||
|
status text not null,
|
||||||
|
unique(chat_room_id, user_id)
|
||||||
|
);
|
||||||
|
|
||||||
|
create table chat_messages (rowid integer primary key,
|
||||||
|
id integer unique not null check(typeof(id) = 'integer'),
|
||||||
|
chat_room_id text not null,
|
||||||
|
sender_id integer not null,
|
||||||
|
sent_at integer not null,
|
||||||
|
request_id text not null,
|
||||||
|
in_reply_to_id integer,
|
||||||
|
text text not null,
|
||||||
|
foreign key(chat_room_id) references chat_rooms(id)
|
||||||
|
foreign key(sender_id) references users(id)
|
||||||
|
);
|
||||||
|
|
||||||
|
create table chat_message_reactions (rowid integer primary key,
|
||||||
|
id integer unique not null check(typeof(id) = 'integer'),
|
||||||
|
message_id integer not null,
|
||||||
|
sender_id integer not null,
|
||||||
|
sent_at integer not null,
|
||||||
|
emoji text not null check (length(emoji) = 1),
|
||||||
|
foreign key(message_id) references chat_messages(id)
|
||||||
|
foreign key(sender_id) references users(id)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
create table fake_user_sequence(latest_fake_id integer not null);
|
create table fake_user_sequence(latest_fake_id integer not null);
|
||||||
insert into fake_user_sequence values(0x4000000000000000);
|
insert into fake_user_sequence values(0x4000000000000000);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user