blob: d8d029a0858f7458f89837092d28c7a3d120d52a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
note: i'm writing this after not working on this project for 6 months
so i'm kind of figuring this out for myself
anyway
Pylon: an outgoing connection from wilson to some chat server/service
which could be "some irc server", "some xmpp server"
or "discord" (discord is centralized so there's only 1 discord to connect to)
(though you COULD have multiple Pylons for discord, if you were crazy)
note that discord's concept of "server" aka "guild" is unrelated to anything
Channel: a particular chatroom on a particular service
eg "#a on apionet irc" or "#general in some discord guild"
in the code, a Channel is identified by a combination of a Pylon
and a string 'channel descriptor', whose format depends on the Pylon type
for instance xmpp channel descriptors are jids, discord uses numeric ids
Thing: used in the code for such a tuple of (pylon, pylon-specific-descriptor)
actually it also has a display name, which defaults to the descriptor
used to represent Channels, Authors, ...
Bus: a family of connected channels that messages will be bridged between
Message: you know what a message is. it has a bunch of fields, which are
source_channel: the Channel the message came from
maybe rename to source
body: the string contents of the message
sender: the username (on the source service) of the message's author
TODO we need more info than that surely
[RFC] Author: a user or personality on a service who created a message
like Channel it's a tuple of (pylon, pylon-specific-descriptor)
eg xmpp would use jids, irc would use nicks, discord uses numeric ids
[RFC] let's change the Message fields to
type=message
author: the Author
channel: the Channel
body: the string contents
type=delete
target=id (? how do we do message ids)
type=edit
target=id
body=the new body
... maybe this should be called Event? aaa
|