Compare commits
5 Commits
1a7a11eaf3
...
4c0f2346d8
Author | SHA1 | Date | |
---|---|---|---|
4c0f2346d8 | |||
9e8541772d | |||
18ba4707ab | |||
b7df79e65d | |||
780dbed7c2 |
23
ROADMAP.md
23
ROADMAP.md
@ -18,11 +18,12 @@
|
||||
* [ ] Message reactions
|
||||
* [x] Read receipts
|
||||
* [x] Power level<sup>[1]</sup>
|
||||
* [ ] Membership actions<sup>[3]</sup>
|
||||
* [ ] Membership actions
|
||||
* [ ] Invite
|
||||
* [ ] Join
|
||||
* [x] Leave<sup>[4]</sup>
|
||||
* [ ] Ban<sup>[5]</sup>
|
||||
* [ ] Unban<sup>[5]</sup>
|
||||
* [x] Leave<sup>[3]</sup>
|
||||
* [ ] Ban<sup>[4]</sup>
|
||||
* [ ] Unban<sup>[4]</sup>
|
||||
* [ ] Room metadata changes<sup>[1]</sup>
|
||||
* [x] Name
|
||||
* [x] Topic
|
||||
@ -51,17 +52,18 @@
|
||||
* [x] On live event
|
||||
* [x] Admin status
|
||||
* [ ] Membership actions
|
||||
* [ ] Invite
|
||||
* [x] Join
|
||||
* [x] Leave
|
||||
* [ ] Self leave
|
||||
* [ ] On backfill
|
||||
* [x] On live event
|
||||
* [x] Kick<sup>[5]</sup>
|
||||
* [x] Unkick<sup>[5]</sup>
|
||||
* [x] Kick<sup>[4]</sup>
|
||||
* [x] Unkick<sup>[4]</sup>
|
||||
* [ ] Channel metadata
|
||||
* [x] Name
|
||||
* [x] Description
|
||||
* [x] Cover photo<sup>[6]</sup>
|
||||
* [x] Cover photo<sup>[5]</sup>
|
||||
* [ ] User metadata
|
||||
* [x] Name
|
||||
* [x] Avatar
|
||||
@ -81,7 +83,6 @@
|
||||
|
||||
<sup>[1]</sup> Sometimes fails with "Invalid body" error
|
||||
<sup>[2]</sup> Only recently-sent KakaoTalk messages can be deleted
|
||||
<sup>[3]</sup> KakaoTalk does not support invites
|
||||
<sup>[4]</sup> To make your KakaoTalk account leave a channel, send the `leave` command in a Matrix portal room. Simply leaving a Matrix portal room will keep your KakaoTalk account in the channel.
|
||||
<sup>[5]</sup> Kicks in KakaoTalk are equivalent to bans in Matrix
|
||||
<sup>[6]</sup> Might only get synced on backfill, or on changing channel name/description
|
||||
<sup>[3]</sup> To make your KakaoTalk account leave a channel, send the `leave` command in a Matrix portal room. Simply leaving a Matrix portal room will keep your KakaoTalk account in the channel.
|
||||
<sup>[4]</sup> Kicks in KakaoTalk are equivalent to bans in Matrix
|
||||
<sup>[5]</sup> Might only get synced on backfill, or on changing channel name/description
|
||||
|
3
SETUP.md
3
SETUP.md
@ -56,10 +56,11 @@ To use them as-is, follow these steps after [initial setup](#initial-setup):
|
||||
1. Copy/link the service files to a directory in the system unit search path, such as `/etc/systemd/system/`
|
||||
1. Create the services' configuration directory with `sudo mkdir /etc/matrix-appservice-kakaotalk`
|
||||
1. RECOMMENDED: Create the `matrix-appservice-kakaotalk` user on your system with `adduser` or an equivalent command, then uncomment the `User` and `Group` lines in the service files
|
||||
* If creating this user, also give it write permissions on the services' configuration directory with `chgrp matrix-appservice-kakaotalk /etc/matrix-appservice-kakaotalk && chmod g+w /etc/matrix-appservice-kakaotalk`
|
||||
* To install as user units:
|
||||
1. Copy/link the service files to a directory in the user unit search path, such as `~/.config/systemd/user`
|
||||
1. Create the services' configuration directory with `mkdir $XDG_CONFIG_HOME/matrix-appservice-kakaotalk`
|
||||
1. Copy the bridge & node-kakao module configuration files to the services' configuration directory as `config.yaml` and `node-config.json`, respectively
|
||||
1. Copy/link the bridge & node-kakao module configuration files to the services' configuration directory as `config.yaml` and `node-config.json`, respectively
|
||||
1. Start the services now and on every boot boot with `[sudo] systemd [--user] enable --now matrix-appservice-kakaotalk{,-node}`
|
||||
|
||||
## Upgrading
|
||||
|
@ -1,2 +1,2 @@
|
||||
__version__ = "0.1.0"
|
||||
__version__ = "0.2.0"
|
||||
__author__ = "Andrew Ferrazzutti <fair@miscworks.net>"
|
||||
|
@ -33,7 +33,7 @@ import asyncio
|
||||
import re
|
||||
import time
|
||||
|
||||
from attr import dataclass
|
||||
from attr import dataclass, evolve
|
||||
|
||||
from mautrix.appservice import IntentAPI
|
||||
from mautrix.bridge import BasePortal, NotificationDisabler, async_getter_lock
|
||||
@ -420,7 +420,7 @@ class Portal(DBPortal, BasePortal):
|
||||
sender_intent = sender.intent_for(self) if sender else self.main_intent
|
||||
admin_level = orig_power_levels.get_user_level(sender_intent.mxid)
|
||||
demoter_ids: list[UserID] = []
|
||||
power_levels = PowerLevelStateEventContent(**orig_power_levels.serialize())
|
||||
power_levels = evolve(orig_power_levels)
|
||||
for user_id, new_level in user_power_levels.items():
|
||||
curr_level = orig_power_levels.get_user_level(user_id)
|
||||
if curr_level < admin_level or user_id == sender_intent.mxid:
|
||||
@ -436,7 +436,7 @@ class Portal(DBPortal, BasePortal):
|
||||
except:
|
||||
self.log.exception("Failed to set power level")
|
||||
if demoter_ids:
|
||||
power_levels = PowerLevelStateEventContent(**orig_power_levels.serialize())
|
||||
power_levels = evolve(orig_power_levels)
|
||||
for demoter_id in demoter_ids:
|
||||
power_levels.set_user_level(demoter_id, user_power_levels[demoter_id])
|
||||
try:
|
||||
|
@ -1009,7 +1009,7 @@ export default class PeerClient {
|
||||
userClient.talkClient.channelList,
|
||||
req.channel_props.type
|
||||
)
|
||||
return channelList.leaveChannel({ channelId: req.channel_props.id })
|
||||
return await channelList.leaveChannel({ channelId: req.channel_props.id })
|
||||
}
|
||||
|
||||
handleUnknownCommand = () => {
|
||||
|
1
setup.py
1
setup.py
@ -63,7 +63,6 @@ setuptools.setup(
|
||||
],
|
||||
package_data={
|
||||
"matrix_appservice_kakaotalk": ["example-config.yaml"],
|
||||
"matrix_appservice_kakaotalk.web": ["static/*", "static/**/*"],
|
||||
},
|
||||
data_files=[
|
||||
(".", ["matrix_appservice_kakaotalk/example-config.yaml"]),
|
||||
|
@ -9,6 +9,7 @@ Type=notify
|
||||
NotifyAccess=all
|
||||
WorkingDirectory=/opt/matrix-appservice-kakaotalk/node
|
||||
ConfigurationDirectory=matrix-appservice-kakaotalk
|
||||
ConfigurationDirectoryMode=775
|
||||
RuntimeDirectory=matrix-appservice-kakaotalk
|
||||
RuntimeDirectoryPreserve=yes
|
||||
ExecStart=/usr/bin/env node src/main.js --config ${CONFIGURATION_DIRECTORY}/node-config.json
|
||||
|
@ -7,6 +7,7 @@ After=multi-user.target network.target
|
||||
; Group=matrix-appservice-kakaotalk
|
||||
WorkingDirectory=/opt/matrix-appservice-kakaotalk
|
||||
ConfigurationDirectory=matrix-appservice-kakaotalk
|
||||
ConfigurationDirectoryMode=775
|
||||
RuntimeDirectory=matrix-appservice-kakaotalk
|
||||
RuntimeDirectoryPreserve=yes
|
||||
ExecStart=/opt/matrix-appservice-kakaotalk/.venv/bin/python -m matrix_appservice_kakaotalk -c ${CONFIGURATION_DIRECTORY}/config.yaml
|
||||
|
Loading…
Reference in New Issue
Block a user