diff --git a/src/pnut_matrix/appservice.py b/src/pnut_matrix/appservice.py index ca7b863..ea71808 100644 --- a/src/pnut_matrix/appservice.py +++ b/src/pnut_matrix/appservice.py @@ -257,29 +257,6 @@ async def new_message(event, user): ) bridge_event.save() - # TODO: need to redo this for global message - # if user is not None: - # cctag = re.search('##$', text) - # if cctag: - # raw = [] - # cname = get_channel_settings(room.pnut_chan)['name'] - # text = text[:-2] - # ftext = '\n\n[' + cname + "](https://patter.chat/room.html?channel=" + str(room.pnut_chan) + ")" - # mtext = textwrap.wrap(text + ftext, 254) - # if len(mtext) > 1: - # longpost = { - # 'title': "", - # 'body': text, - # 'tstamp': time.time() * 1000 - # } - # pretext = textwrap.wrap(text, 100) - # text = pretext[0] - # text += "... - https://longpo.st/p/{object_id} - #longpost" - # raw.append({'type':"nl.chimpnut.blog.post", 'value': longpost}) - # - # text += ftext - # r, meta = pnutpy.api.create_post(data={'text': text, 'raw': raw}) - except pnutpy.errors.PnutAuthAPIException: if room.pnut_chan != 0: logging.exception('-unable to post to pnut channel-')