Sun, 10 Aug 2025 23:44:08 +0800
Add Purple.Conversation.find_message_by_id
The method was added so that a protocol or plugin could easily lookup
for the reference for a message. This will be especially useful when a
protocol received a quoted message but only with an id.
|
43283
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | INSERT INTO conversations( |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | account_id, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | age_restricted, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | alias, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | conversation_id, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | created_on, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | creator_id, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | description, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | drafting, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | favorite, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | federated, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | logging, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | needs_attention, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | title, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | topic, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | topic_author_id, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | topic_updated, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | type, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | url, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | user_nickname |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | ) |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | VALUES ( |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | :account_id, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | :conv_age_restricted, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | :conv_alias, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | :conv_id, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | :conv_created_on, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | :creator_id, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | :conv_description, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | :conv_drafting, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | :conv_favorite, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | :conv_federated, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | :conv_logging, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | :conv_needs_attention, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | :conv_title, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | :conv_topic, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | :topic_author_id, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | :conv_topic_updated, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | :conv_type, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | :conv_url, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | :conv_user_nickname |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | ) |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | ON CONFLICT(account_id, conversation_id) |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | DO UPDATE SET |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | age_restricted=:conv_age_restricted, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | alias=:conv_alias, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | created_on=:conv_created_on, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | creator_id=:creator_id, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | description=:conv_description, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | drafting=:conv_drafting, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | favorite=:conv_favorite, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | federated=:conv_federated, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | logging=:conv_logging, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | needs_attention=:conv_needs_attention, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | title=:conv_title, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | topic=:conv_topic, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | topic_author_id=:topic_author_id, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | topic_updated=:conv_topic_updated, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | type=:conv_type, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | url=:conv_url, |
|
01eb1bbf4186
Serialize conversations and their tags
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | user_nickname=:conv_user_nickname |